Kyma Forum
  Tips & Techniques
  lowest/ highest note

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   lowest/ highest note
franz
Member
posted 06 June 2009 06:58         Edit/Delete Message   Reply w/Quote
Hi! I want to trigger some samples with the lowest and/or highest note played on a keyboard when playing chords but I have absolutely no idea how to do this. It should work like playing an extra bass or soprano sound at the lowest or highest key of a chord. Any ideas?

Thanks a lot!
franz

IP: Logged

SSC
Administrator
posted 06 June 2009 09:11         Edit/Delete Message   Reply w/Quote
Maybe you could add three Samples together: one whose frequency is !KeyPitch, one at 8 c, and one at 0 a. All three of them would be triggered by !KeyDown. Put this mix into a MIDIVoice and give it the polyphony of the changeable chord you would like to play (minus the high/low pedal tones). Then when you play the MIDI keyboard, you would hear whatever chord you play on the keyboard plus two pedal tones (one at the highest pitch and one at the lowest pitch of the keyboard). Is this what you need?

IP: Logged

franz
Member
posted 06 June 2009 10:33         Edit/Delete Message   Reply w/Quote
Hi SSC! With this solution, the samples in the base and soprano would remain always at the same pitch, right?
The problem is, the bass and soprano- samples should also be able to change their Frequency according to the current Keynumber in the Bass/ Soprano, played on the Keyboard. So, they should double the lowest (and highest) played Key at any Keynumber I play.
This behavior is found on organs of the beginning of the 20th century with pneumatic Key action. So you could play the Bass -usually played with the pedal - with the manual as the pedal is coupled via a special coupling mechanism to every lowest Key played on the manual.
I suspect, some smalltalk code is necessary here- but I´would not be able to write such a code...

Best,
franz


IP: Logged

pete
Member
posted 06 June 2009 13:40         Edit/Delete Message   Reply w/Quote
Hi Franz

This is actually quite involved. The important factor here is that Kyma doesn't give us the raw midi date but instead gives us what we need for mono and poly playing of sounds.

If we look at Kyma mono midi first and soprano only (bass is the same only upside down).
We get !KeyDown and !Pitch (and its variations).
We need to know what is currently the highest played note.
!Pitch gives us the pitch of the most resent note played. Now when we play chords the info is passed one note at a time even if we don't arpegiate the way we play, so we could keep a record of every note that has been pressed and pick out the one with the highest value, but we are missing an important piece of information. We do not know when any of the note have been released. !KeyDown will only tell us when all the notes have been released, but we need to have this info to make it work.

Imagine you play a chord where note 60 nn is the highest note. if you then (while keeping the chord held) played note 59 nn as well you would expect the soprano to stay at 60 nn, but if note 60nn had been released before 59 was played you would expect the soprano to move down to note 59. As we are not given note off info in mono mode this is impossible to do what you want no matter how much capytalk or smalltalk we write.

Now lets look at poly midi as provided by the MidiVoice module.
Here kyma gives us more info from the incoming midi, but is still in a pre organized form.
If we chose a poly of 8 in the Midi Voice it will make 8 invisible copies of any modules on the left of the MidiVoice, and pass to each of the copies a different !KeyDown and a !Pitch. We need all this info in one place as we need to do comparisons between all 8 notes. So we could put a sound to global controller module to the left of the midi voice and make sure that each transmits a different name using VoiceNbr append to the controllers name. We could then turn the !Pitch into nn or use !KeyPitch but replace the value with -128 every time that !KeyDown is off, making use of capytalk logic. This will be transmitted to all other modules in the sound, and we can use one to gather up all the notes info in one place. The reason I say replace nn with -128 during note off instead of zero will become apparent later.

Now if we put another sound to global controller to the right of the MidiVoice module, we can use an 8 cycle capy talk loop which reads out of off an array filled with the 8 controller names. This can do a running comparison to find the vmax: of the currently pressed notes values and this is what gets transmitted from this global controller as the soprano pitch. Also Note On info can be extracted by the " ne: -128" formula. Alternativle you could do long hand formula made of 7 vmax: with the 8 controller names thrown in.

The bass can be done by another sound to global controller using the same 8 global names except it would find the running vmin: of the ABS olute value of the global names. Thats why the note off had to be -128 not zero.

This would take quite a bit of work and I may have missed some anomaly that will get in the way but it may be worth a try.

Hope it makes sense.

Pete

[This message has been edited by pete (edited 06 June 2009).]

IP: Logged

Bill Meadows
Member
posted 07 June 2009 08:38         Edit/Delete Message   Reply w/Quote
Sounds like a job for MAX.

Write a little MIDI pre-processor to extract the high and low note numbers and send them to Kyma.

IP: Logged

franz
Member
posted 07 June 2009 11:42         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by pete:
So we could put a sound to global controller module to the left of the midi voice and make sure that each transmits a different name using VoiceNbr append to the controllers name.

Hi Pete, thanks for the informations. Unfortunately, smalltalk or capytalk logic is not really my strength, so I have to ask you some further questions.
When I put a sound to global controller module to the left of the midi voice, how can I be sure that each transmits a different name? Usually this would produce 7 copies of one and the same controller, right? How would I use "VoiceNbr"?

quote:
Originally posted by pete:
We could then turn the !Pitch into nn or use !KeyPitch but replace the value with -128 every time that !KeyDown is off, making use of capytalk logic.


How would I do this?

quote:
Originally posted by pete:

Now if we put another sound to global controller to the right of the MidiVoice module, we can use an 8 cycle capy talk loop which reads out of off an array filled with the 8 controller names. This can do a running comparison to find the vmax: of the currently pressed notes values and this is what gets transmitted from this global controller as the soprano pitch. Also Note On info can be extracted by the " ne: -128" formula. Alternativle you could do long hand formula made of 7 vmax: with the 8 controller names thrown in.

Here again, I´m stuck. If you have time for this, it would be great if you could give me an example of how to build this kind of capy talk loop and running comparison!

Hi Bill, as my knowledge in programming Max is even worse than in Kyma, I´d be glad if this could be done with Kyma...

Thanks a lot!
franz

[This message has been edited by franz (edited 07 June 2009).]

[This message has been edited by franz (edited 07 June 2009).]

IP: Logged

Bill Meadows
Member
posted 07 June 2009 12:53         Edit/Delete Message   Reply w/Quote
Well, in MAX you'd start with four objects like this:

(notein) -> (thresh 200) -> (minimum) -> (noteout)

The "thresh" object will collect all of the MIDI note numbers received in a specified window of time (e.g. 200ms) and send them as a list to the "minimum" object. The "minimum" object outputs the lowest value in that list, which you can then transmit as a MIDI note.

You can also route to a "maximum" object to get both the highest and lowest notes numbers in each chord.

You will need to add a few other objects around this to finish it up, but it's just about that easy.

IP: Logged

olin
Member
posted 07 June 2009 15:08         Edit/Delete Message   Reply w/Quote
Hi Franz,

This non-Kyma kludge ( sorry SSC ) may be of some help to you.

apulSoft's apTrigga2 is an audio sample trigger plugin for Mac OS X (VST/AU) and Windows (VST). It supports audio samples in .WAV, .AiFF, and SD2 format. MIDI input Note-On messages are converted to trigger events which makes it possible to play audio samples with apTrigga and a midi keyboard.
http://www.apulsoft.ch/aptrigga/index.php

In Logic, apTrigga2 can be inserted into an instrument slot. Audio needs then to be sent to apTrigga via the sidechain menu and midi comes from the instrument track it is inserted into.

In Cubase SX there will be an additional virtual midi output as soon as apTrigga2 is inserted anywhere. It can be used with any midi track after that.

In Ableton Live, apTrigga2 can be dropped onto a midi track and receives midi from that track. As long as there is no Instrument inserted, it will also receive Note-On / Off Information. To get audio into the track, Live’s track input menu has to be used.

IP: Logged

SSC
Administrator
posted 07 June 2009 15:57         Edit/Delete Message   Reply w/Quote
Hi Franz, Sorry I misunderstood your first note. Do you want to double the highest and lowest pitch in a chord? Do you want to double it with the same timbre? Or with a different timbre (and possibly and octave below and above?)

If it is the same timbre, maybe we just have to double the amplitude of the lowest and highest notes of the chord.

IP: Logged

pete
Member
posted 07 June 2009 16:00         Edit/Delete Message   Reply w/Quote
Hi franz

in Value put

!KeyDown true: !KeyNumber false: -128

in GeneratedEvent Put

('Note' & ?VoiceNumber) asHotValue

hope it helps

Pete

IP: Logged

SSC
Administrator
posted 07 June 2009 16:35         Edit/Delete Message   Reply w/Quote

Franzdblhighandlow.kym

 
Here are a couple of different ideas. The first one assumes the polyphony is 10. The second one has adjustable polyphony (max 16) and works with any Sounds that you want to use as your doubling Sounds.

IP: Logged

pete
Member
posted 07 June 2009 16:42         Edit/Delete Message   Reply w/Quote

HiNote.kym

 
bad sounds but gives the idea
Pete

IP: Logged

pete
Member
posted 07 June 2009 17:03         Edit/Delete Message   Reply w/Quote

BothNote.kym

 
Now with both notes

IP: Logged

franz
Member
posted 08 June 2009 14:27         Edit/Delete Message   Reply w/Quote
PHANTASTIC! Thank you so much, SSC and Pete! This is exactly I was looking for! It looks quite simple, but it will take me some time to analyse and understand these sounds!
Thanks for your suggestions, Bill and Olin- as I want to keep my setup as simple as possible (I´m doing mostly live performances), I´m very happy, this can be done within Kyma.

Thank you!
Franz

[This message has been edited by franz (edited 08 June 2009).]

[This message has been edited by franz (edited 08 June 2009).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c