Kyma Forum
  Kyma Support
  Smalltalk expressions problems

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

next newest topic | next oldest topic
Author Topic:   Smalltalk expressions problems
Graham Breed
Member
posted 06 May 2001 15:19         Edit/Delete Message   Reply w/Quote
I'm using expressions in a MIDI Mapper for alternative tunings. I find this one doesn't work:

"24 note miracle tuning on the sharp side"
!Pitch is: (
`MIDIKeyNumber -60 //24
+ ((
(`MIDIKeyNumber - 60 mod: 24)
of: { Array
with: -5 with: 0 with: 2 with: 7 with: 9 with: 11 with: 14
with: 16 with: 21 with: 23 with: 28 with: 30 with: 32
with: 35 with: 37 with: 42 with: 43 with: 45 with: 49
with: 51 with: 56 with: 58 with: 63 with: 65}
)/72)
* 12) nn + 4c nn + (!PitchBend*2) nn.

I get an "error during literal evaluation" which can be fixed by making the arrays smaller. I can also get a different error by not using a literal for the array

The long-winded way of constructing arrays is because I already found that the #(1 2 3 ...) method doesn't work in this context.


Help, please!


Graham

IP: Logged

SSC
Administrator
posted 06 May 2001 20:20         Edit/Delete Message   Reply w/Quote
The Array literal way should work:

!Pitch is: (
`MIDIKeyNumber -60 //24
+ ((
(`MIDIKeyNumber - 60 mod: 24)
of: #( -5 0 2 7 9 11 14 16 21 23 28 30 32 35 37 42 43 45 49 51 56 58 63 65 )
)/72)
* 12) nn + 4c nn + (!PitchBend*2) nn

Please email us with details if this doesn't seem to work...

[This message has been edited by SSC (edited 06 May 2001).]

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