Skip to main content
Topic: Unjazz my MIDI (Read 15441 times) previous topic - next topic

Unjazz my MIDI

Confused by this topic's title? You soon will be...

I imported a nice jazzy MIDI into NWC2. In this case, the jazzy rhythm winds up in my NWC file like this:

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Note|Dur:8th,Dotted|Pos:-6|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam=End
|Note|Dur:8th,Dotted|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:0|Opts:Stem=Up,Beam=End
!NoteWorthyComposerClip-End

That is, dotted 8ths paired with 16ths. I want all these pairs to change into pairs of 8ths, in order to control the jazz sound myself with a "standard" NWC method (MIDI controller)

The GlobalMod user tool does not seem to be able to change pairs of objects. (My judgement, please correct me if I'm wrong).

Is there another (easy) way to accomplish what I want? I started editing the pairs by hand, but that is a long and tedious process.

Thanks,
Wilm

The "reward" will be: a nice arrangement of "Take Five" for saxophone and piano
Wilm Boerhout

Re: Unjazz my MIDI

Reply #1
G'day Wilm,
You can do this in 2 passes with Global_Mod

Assuming they are all beamed pairs as in your example.
First pass:
Note,Dur.8th,Dur.Dotted,Opts.Beam==First Dur=8th

Second Pass:
Note,Dur.16th,Opts.Beam==End Dur=8th

If you have some that are not beamed then you can remove the "Opts.Beam==xxx" part but beware that it could change bits you don't want changed.  I would make selections and run the tool over each selection in turn.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Unjazz my MIDI

Reply #2
Lawrie,

Thanks for giving this a thought.

However, there are dotted eights that are not in any pair, and they will have to remain dotted. So, still a lot of selecting and GlobalMod to do in that case.

I have been a programmer in a previous life, and am now taking a flight forward, away from Windows and on to the only platform I know how to program on: OpenVMS and DCL. Ahh, those were the days.

I'll post the outcome in the NWC2 newsgroup. (Why? I'm still a bit confused on what should go where and why we have 2 (3?) newsgroups)

/Wilm
Wilm Boerhout


Re: Unjazz my MIDI

Reply #4
Thanks. Just for old times sake, here's how to do it in OpenVMS DCL.

Invoke: @UnJazz clip.txt clip.out, where clip.txt holds the input clip and... well, you figure it out.
How this must be rewritten for pairs of (16.,32) and others is left as an exercise for the reader.

/Wilm

File UnJazz.COM
Code: [Select · Download]
$	get := read infile /end=EOI
$ put := write outfile
$!
$ open /read infile 'P1'
$ open /write outfile 'P2'
$ LOOP:
$ have_rec2 = 0
$ get rec
$ if F$element(1,"|",rec).nes."Note" then goto PUT
$ if F$element(2,"|",rec).nes."Dur:8th,Dotted" then goto PUT
$!
$! Now we have a dotted 8th, read the next record...
$!
$ get rec2
$ have_rec2 = 1
$ if F$element(1,"|",rec2).nes."Note" then goto PUT
$ if F$element(2,"|",rec2).nes."Dur:16th" then goto PUT
$!
$! Now we have a pair of [dotted 8th,16th], modify the records...
$!
$ fr = "8th,Dotted"
$ to = "8th"
$ di = F$len(fr)-F$len(to)
$ ifrom = F$loc(fr,rec)
$ rec = F$ext(0,ifrom,rec)+to+F$ext(ifrom+F$len(to)+di,255,rec)
$!
$ fr = "16th"
$ to = "8th"
$ di = F$len(fr)-F$len(to)
$ ifrom = F$loc(fr,rec2)
$ rec2 = F$ext(0,ifrom,rec2)+to+F$ext(ifrom+F$len(to)+di,255,rec2)
$ PUT:
$ put rec
$ if .NOT.have_rec2 then goto LOOP
$ put rec2
$ goto LOOP
$ EOI:
$ close infile
$ close outfile
Wilm Boerhout

Re: Unjazz my MIDI

Reply #5
G'day Wilm,

However, there are dotted eights that are not in any pair, and they will have to remain dotted. So, still a lot of selecting and GlobalMod to do in that case.

While Eric has made this redundant (Thanks Eric for the new tool) the "Opts.Beam==First/End" part of the selection section causes this Global_Mod expression to ignore unbeamed notes.

PS I like your signature photo
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Unjazz my MIDI: Take Five

Reply #6
OK, I promised you a "Take Five".

Here is the first installment. Work to be done:
  • "Collapse" the flow control
  • Listen to a recording and do the dynamics
  • Ask Eric -politely- for an extension to his UnJazzify.php. Note the piano score with in the RH pairs of (Dotted 8th rest,16th note) and in the LH pairs of (Dotted 8th note, 16th rest). For this to work with the tempo controllers, each staff must have straight eighths

/Wilm

PS [glow=red,2,300]all Page and Staff fonts are SwingText, User1 font is SwingDings[/glow]
Wilm Boerhout

Re: Unjazz my MIDI

Reply #7
<snip>
PS I like your signature photo

Hmm, thanks, but I'm not sure. I've been messing around with my signature (added a link to a photo), but I'm not seeing it myself. Does this post have a signature? What do you see?
Wilm Boerhout

Re: Unjazz my MIDI

Reply #8
Quote
However, there are dotted eights that are not in any pair, and they will have to remain dotted. So, still a lot of selecting and GlobalMod to do in that case.

Have you tried using the Find tool?  Sometimes the older features are quick and easy.


Re: Unjazz my MIDI

Reply #9
G'day Wilm,

Hmm, thanks, but I'm not sure. I've been messing around with my signature (added a link to a photo), but I'm not seeing it myself. Does this post have a signature? What do you see?

I see a quite sharp photo of yourself against an indeterminate but colourful background.

BTW I'm really pleased to see SwingDings getting a guernsey (Aussie slang for being put forward or having an opportunity to appear etc.)  Thankyou.  Of course now I'll have to hurry up and publish to the Scripto.  Not quite ready yet but Real Soon Now.  NG denizens have access to the beta links...  Thankyou Wilm!
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Unjazz my MIDI

Reply #10
Have you tried using the Find tool?  Sometimes the older features are quick and easy.

I have. Find will let me find a single dotted 8th. It will not let me find a pair of anything. I would then have to modify all dotted 8ths, then finding the 16th rests (by now the 8th aren't dotted anymore, so I will quickly lose the context of what I'm doing)

Back to DCL then...
Wilm Boerhout

Re: Unjazz my MIDI

Reply #11
I see a quite sharp photo of yourself against an indeterminate but colourful background.
Yup, that's the one. Quite artful, innit? Now if I could only see it myself...

BTW I'm really pleased to see SwingDings getting a guernsey (Aussie slang for being put forward or having an opportunity to appear etc.)  Thankyou.  Of course now I'll have to hurry up and publish to the Scripto.  Not quite ready yet but Real Soon Now.  NG denizens have access to the beta links...  Thankyou Wilm!
You're welcome. I like the Swing* Font Suite (now doesn't that sound fancy, a suite!) Every print looks like it's straight from the Real Book!
Wilm Boerhout

Re: Unjazz my MIDI

Reply #12
Quote
Find will let me find a single dotted 8th. It will not let me find a pair of anything.

I see what you mean.  Seems to me this is a changed behaviour.  I think I used to be able to paste a text string of more than one element into the Find search window, and it would highlight the string each time it was found.  Then with something else in the clipboard, it was just a matter of F3 to find the target, and Ctrl V to paste the subject over it.

If you wanted to find all dotted 8ths, you could edit the text string in the Find window too, so it wouldn't matter what pitch.

Maybe I'm misremembering the capability, but if I'm right, I'm sorry it's gone.




 

Re: Unjazz my MIDI

Reply #13
<snip> Now if I could only see it myself...

I do see the picture using Internet Explorer, I don't see it when I'm using Mozilla Firefox.
Browsers... pfui!

[Edit] Users... more pfui...
It turned out that I did not allow this forum to download remote images. Now I do, and all's well with the world.
Wilm Boerhout

Re: Unjazz my MIDI

Reply #14
Maybe I'm misremembering the capability, but if I'm right, I'm sorry it's gone.

I have never noticed/used the capability before, so I wouldn't know.

Anyway, it's moot now, since Eric has provided V1.1 of UnJazzify (see User Tools section of this forum). It now also straightens out (rest,note/chord) and (note/chord,rest) pairs.
Wilm Boerhout