Skip to main content
Topic: Override stem length? I wish! (Read 4760 times) previous topic - next topic

Override stem length? I wish!

Any idea on how to shorten those stems?

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|Dynamic|Style:pp|Pos:-10|Wide:Y
|Chord|Dur:8th,Grace|Pos:b-2,b-1,b5,b6,b12|Opts:NoLegerLines,Muted|Visibility:Never
|User|Arpeggio.ms|Pos:-3|Dir:down|Rate:64|Visibility:Never
|Chord|Dur:Half|Pos:-2z,-1z,0z,1z,2z,3z,5z,6z,7z,8z,9z,10z,12z,b13|Opts:Crescendo,StemLength=7,Muted
|Note|Dur:8th,Grace|Pos:13|Opts:Crescendo,ArticulationsOnStem,Muted|Visibility:Never
|Spacer|Width:525
|User|Glissando.ms|Pos:1
|Note|Dur:8th,Grace|Pos:-4|Opts:Crescendo,ArticulationsOnStem,Muted|Visibility:Never
|Dynamic|Style:mp|Pos:-10|Visibility:Never
|Spacer|Width:75
|User|Arpeggio.ms|Pos:-3|Rate:64|ForceArrow:Y|Visibility:Never
|Chord|Dur:Half|Pos:-4,-2z,-1z,0z,1z,2z,3z,5z,6z,7z,8z,9z,10z,12z,13z|Opts:Stem=Up,Diminuendo,StemLength=7,NoLegerLines,Muted
|Spacer|Width:650
|User|Glissando.ms|Pos:1
|Bar
|Note|Dur:8th,Grace|Pos:n13|Opts:Diminuendo,ArticulationsOnStem,Muted|Visibility:Never
|Chord|Dur:8th,Grace|Pos:b-2,b-1,b5,b6,b12|Opts:NoLegerLines,Muted|Visibility:Never
|Dynamic|Style:pp|Pos:-10|Visibility:Never
|User|Arpeggio.ms|Pos:-3|Dir:down|Rate:64|Visibility:Never
|Chord|Dur:Half|Pos:-5z,-4z,-2z,-1z,0z,1z,2z,3z,5z,6z,7z,8z,9z,10z,12z,b13|Opts:StemLength=7,Muted
|Note|Dur:8th,Grace|Pos:13|Opts:ArticulationsOnStem,Muted|Visibility:Never
|Spacer|Width:525
|User|Glissando.ms|Pos:1|EndOffsetY:1
|User|Arpeggio.ms|Pos:-3|Rate:64|ForceArrow:Y|Visibility:Never
|Chord|Dur:Half|Pos:-6,-5z,-4z,-2z,-1z,0z,1z,2z,3z,5z,6z,7z,8z,9z,10z,12z,13z|Opts:Stem=Up,StemLength=7,NoLegerLines,Muted
|Spacer|Width:650
|User|Glissando.ms|Pos:1
|Bar
|Note|Dur:8th,Grace|Pos:n13|Opts:ArticulationsOnStem,Muted|Visibility:Never
!NoteWorthyComposerClip-End

N.B. I started to think this is a case for a only visible staff plus a hidden staff playing...

Re: Override stem length? I wish!

Reply #1
It looks like what you really want is a glissando object that plays (so you won't need to use hidden arpeggios and blank noteheads).

Or as you say, put the playback notes on a hidden staff.

Re: Override stem length? I wish!

Reply #2
Quote
Or as you say, put the playback notes on a hidden staff.
Well, I'll go that way.
What I love the least is to work with invisible notes; invisible in the editor too, I mean.
Thanks

Re: Override stem length? I wish!

Reply #3
Do you really need a glissando or what trombone players call a gliss, which is actually a portamento?

If the latter, then a pitch change MPC will do the job, especially now that you can set the pitch bend range in the instrument properties.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Override stem length? I wish!

Reply #4
Any idea on how to shorten those stems?
Don't do stupid things. Then you won't need to solve stupid problems.
Just a thought  ::)
Registered user since 1996

Re: Override stem length? I wish!

Reply #5
Do you really need a glissando or what trombone players call a gliss, which is actually a portamento?
Listening to the clip, it sounds very much like harp glissandos to me.

I have toyed with the idea of adding playback to the Glissando.ms object, but from what I have read about their performance, it could be complicated. Different instruments seem to do them differently. For example, on a piano, you would probably want to play just the white (or black?) keys, whereas on a harp, there could be all sorts of options. On a guitar, they would probably need to be in half-steps. And I was considering only discrete (chromatic) glissandos, not the continuous portamento that horns and non-fretted string instruments can do.

I am also trying to add system spanning to the drawing of glissandos, which should be fairly easy now, but for some reason it is proving to be a challenge.

Re: Override stem length? I wish!

Reply #6
I have toyed with the idea of adding playback to the Glissando.ms object, but from what I have read about their performance, it could be complicated.
How about just playing a list of MIDI numbered notes in a specified number of clicks?
Registered user since 1996

Re: Override stem length? I wish!

Reply #7
Listening to the clip, it sounds very much like harp glissandos to me.
True, but I was wondering what Flurmy actually wanted rather that what the example showed.

If you do add sound to your gliss object, please make sure there is a way to either disable it (to allow an MPC to work), OR add the pitch sweep capacity of the MPC to allow for Trombones and unfretted stuff.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Override stem length? I wish!

Reply #8
Listening to the clip, it sounds very much like harp glissandos to me.

I have toyed with the idea of adding playback to the Glissando.ms object, but from what I have read about their performance, it could be complicated. Different instruments seem to do them differently. For example, on a piano, you would probably want to play just the white (or black?) keys, whereas on a harp, there could be all sorts of options. On a guitar, they would probably need to be in half-steps. And I was considering only discrete (chromatic) glissandos, not the continuous portamento that horns and non-fretted string instruments can do.
Full strike!  :D

With a harp you often use omophonies so as to have every time a very distinctive glissato, quite different from the usual diatonic or chromatic glissando, not to say about the portamento you (usually) get with MPC.
Of course, in theory you can always tinker with the span and sweep resolution of MPG to get a chromatic glissando...   :))

Code: (nwc) [Select · Download]
I was wondering what Flurmy actually wanted rather that what the example showed.
No, Lawrie, that's quite close to what I needed.

By the way: I copied the "arpeggio" on a hidden staff, so no problem of invisible noteheads.

 

Re: Override stem length? I wish!

Reply #9
I have toyed with the idea of adding playback to the Glissando.ms object

Possible adaptation of Version 2.0b of Glissando.ms:

Code: (lua) [Select · Download]
local PlaybackStyle = {'None','Chromatic','AllNaturals'}
local KeyIntervals = {
None = {},
Chromatic = {0,1,2,3,4,5,6,7,8,9,10,11},
AllNaturals = {0,2,4,5,7,9,11},
}
...

local _spec = {
...
{ id='Playback', label='Playback', type='enum', default=PlaybackStyle[1], list=PlaybackStyle },
}

...

local function GlissOctaveNearestNextInterval(t,inOctaveSemiTone)
for i,v in ipairs(t) do
if v >= inOctaveSemiTone then return i-1 end
end
return 0
end

local function CountGlissIntervals(k,v)
local o = math.floor(v/12)
local i = v % 12

return #k*o + GlissOctaveNearestNextInterval(k,i)
end

local function GlissNoteFromInterval(k,v)
local opitches = #k
local o = math.floor(v/opitches)
local i = v % opitches

return 12*o + k[i+1]
end

local function _play(t)
local playback = KeyIntervals[t.Playback]
if #playback < 1 then return end

if not (hasPriorTargetNote(priorNoteidx) and nextNoteidx:find('span', 1)) then return end
local startSPP = priorNoteidx:sppOffset()
local acc = t.TargetAcc
local dur = -startSPP

local v1 = nwcplay.getNoteNumber(priorNoteidx:notePitchPos(1) or '0')
local v2 = nwcplay.getNoteNumber(nextNoteidx:notePitchPos(1))
local inc = (v1<v2) and 1 or -1
local interval1,interval2 = CountGlissIntervals(playback,v1,inc),CountGlissIntervals(playback,v2,inc)
local deltav = math.abs(interval1-interval2)-1
if deltav < 1 then return end
local deltaSPP = dur/(deltav+1)
if deltaSPP < 1 then return end
for i=0,deltav do
local interval = interval1+(inc*i)
local notepitch = GlissNoteFromInterval(playback,interval)
if ((i==0) and (notepitch~=v1)) then notepitch = v1 end
nwcplay.note(startSPP+(deltaSPP*i),deltaSPP,notepitch)
end
end