[Csnd] code share: cpsmidinn_a432
| Date | 2020-06-18 14:24 |
| From | Mikoláš Štrajt |
| Subject | [Csnd] code share: cpsmidinn_a432 |
| Hi, I did some hunting in User-Defined Opcode Database and found UDO implementation of cpsmid opcode. See http://www.csounds.com/udo/displayOpcode.php?opcode_id=64 I used this to create new cpsmidinn_a432 opcode as follows: opcode cpsmidinn_a432, k, k kmid xin #define MIDI2CPS(xmidi) # (432.0*exp(log(2.0)*(($xmidi)-69.0)/12.0)) # kcps = $MIDI2CPS(kmid) xout kcps endop -- Mikoláš |
| Date | 2020-06-18 16:11 |
| From | john |
| Subject | Re: [Csnd] code share: cpsmidinn_a432 |
Is this ny different to setting A4 = 432 ?
On Thu, 18 Jun 2020, Mikoláš Štrajt wrote:
> Hi,
> I did some hunting in User-Defined Opcode Database and found UDO
> implementation of cpsmid opcode. See
> http://www.csounds.com/udo/displayOpcode.php?opcode_id=64
>
> I used this to create new cpsmidinn_a432 opcode as follows:
>
> opcode cpsmidinn_a432, k, k
> kmid xin
> #define MIDI2CPS(xmidi) # (432.0*exp(log(2.0)*(($xmidi)-69.0)/12.0)) #
> kcps = $MIDI2CPS(kmid)
> xout kcps
> endop
>
> --
> Mikoláš Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here
>
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |