Glad it worked. So to elaborate a bit more:
50.midicps = 146.8323839587
146.8323839587.cpsmidi = 50.0. So when converting in this direction, the result will be a float.
The ‘def family’ includes Pdef for patterns, Tdef for tasks and routines and MIDIdef for MIDI communication. My advice is to use these when you can. They have some advantages that you can read about in the docs, for instance, you can play a Pdef, change some stuff inside it and re-evaluate it while it is playing and things will be updated on the fly.
When dealing with midi I suggest using these convenient methods from the MIDIdef class:
MIDIdef.cc
MIDIdef.noteOn
MIDIdef.noteOff
If you don’t already know, command D (on a mac) will call up the documentation of whatever class or method your curser is on. So if you type ‘MIDIdef’ and hit command + D (or equivalent) you are taken straight to the help files.
Like with almost everything in SC, MIDI can be done in different ways, MIDIdef is the easiest to me (and to most people I suspect).
There are two ways (probably many more) to play chords in SC: The one used above is not very intuitive at first, but it really highlights the power of SC. Instead of thinking like you would in the analog world or in a DAW ‘I need a polyphonic synth to play a chord’ the SC-way is to use one instance of a synth for each note. Once you wrap your head around it, you really realize how powerful this concept is. You don’t have to worry about max number of voices, voice stealing etc. and it is very easy to address each individual voice and customize parameters and so on. Keep your synths in arrays (or lists) opens up for all kinds of interesting ways of manipulation the individual voices through array manipulation (.collect, .do, .flop, .difference, .diff, .select, and a ton of more methods). The documentation is spread out over several help files. There is a lot of good stuff in ArrayedCollection which is not obvious at first.
The other way, more in line with an analog- or DAW mindset is to build SynthDefs which can handle chords directly. The problems here is that you have to define a max number of voices and that if you use less than the maximum number of voices all unused or rather silent voices are still there eating at your cpu. Plus added (and often unneeded) complexity of the SynthDefs.