Global transpose with Midi Chord maker

Hi fellow scripting experts,
would someone of you be so kind to help me create a scriptlet which simply brings the global transpose to a certain point in my rackspaces?

Reason: I would like to be able to globally transpose rackspaces which make use of the Midi Chord maker.
So I was thinking to ignore global transpose on the corresponding Midi In block and instead of this adding a scriptlet which adds the global transpose value after the midi Chord maker.
That should work, right?

That’s exactly right. You can then add a MIDI Transposer block after MIDI Chord Maker to transpose the notes.

But a usual midi Transposer block wouldn´t do the job as it doesn´t react to global transpose. So it would need manual correction each time.
That´s why I would love to have a scriptlet doing the job automatically.

I had need to handle this as well. I was thinking a checkbox on the chord maker dialog to tell it ignore or match the transpose would be easiest for end users. But I would be happy if a transpose block could handle it where one before chord maker could reverse the transpose for input and one after the chord maker would reapply it with to the output. That would allow for transposing the entire song and chord maker would adjust appropriately. I do think it would be something you would want to enable or disable as it may not always be what you want to have happen with a transpose block. Something for the dream list.

Try putting this into a scriptlet. Put the scriptlet after Chord Maker in the signal chain.

TP : Integer
NM : NoteMessage

On NoteEvent(m : NoteMessage)
    TP =  GetGlobalTranspose()
    NM = WithTranspose(m, TP)
    SendNow(NM)
End
2 Likes

Perfect !!! Many thanks :grinning_face:
This is exactly what I needed.

Now I can simply check the “Ignore global transpose” checkbox on the Midi In block, add that sciptlet after the Midi Chord maker and will be always fine when I need to adjust the global transpose.

1 Like

@edm11 sorry to bother you again about this.

While it works perfectly to react to global transpose, I now got to the conclusion that it would be more helpful if the script would get the transpose from the Song.
I tried to replace the “TP = GetGlobalTranspose()” line with “TP = GetSongTranspose()” but that doesn´t seem to work.
Any idea how the script need to look like for this?

Does it compile?

This is the correct syntax

GetSongTranspose(<index : integer>)

GetSongTranspose(<index : integer>)
Is the current syntax, means <index : integer> has to be replace by the Song Index
The function GetCurrentSongIndex() gets the index of the current selected song.

TP = GetSongTranspose(GetCurrentSongIndex())

1 Like

Ok thanks for clarifying
I´m not a programmer at all.

Now it compiles fine, but doesnt transpose… Anything else that is missing here?

Try this

var t : Integer

On NoteEvent(m : NoteMessage)
 
 
 t = GetSongTranspose(GetCurrentSongIndex())

 SendNow(WithTranspose(m,t))

 
End

But I do not understand why you need that.
For example when Song Tranpose is set to 1 semitone and you play a C3 then the scriptlet now sends out D3.
Without the scriptlet when playing C3 C#3 is sent out.

No, because i check the ignore Global transpose on the Midi in. I need the transpose to happen after the Midi Chord maker.

OK, understand
Then the code I posted should work

unfortunately it doesn´t.
Compiles fine, but it doesn´t transpose

Are you in SetList Mode?

I found the root cause

Use this script

var t : Integer

On NoteEvent(m : NoteMessage)
 
 if InSetlistMode() then
  t = GetSongTranspose(GetCurrentSongIndex())
 else
  t = 0
 end
 
 SendNow(WithTranspose(m,t))

End

The issue occurs when you are in Rackspace view and play notes.
Because the function GetSongTranspose cannot work in rackspace view it faces an error.
This error can be avoided when you check if you are in SetList Mode.

4 Likes

Great !!! :grinning_face:

This one works perfectly !!!

Thanks a lot. I really appreciate how much effort you put into helping so many people here.

1 Like