• Re: ESP32FORTH: music, tones and test

    From Zbig@21:1/5 to All on Mon May 15 13:25:15 2023
    OK, having ESP32 board working I can fix — months later — that code. Obviously I missed the fact, that the created note in fact doesn't
    calculate a value and then leave it on the stack — for that purpose
    the constant would do — but it does action instead: it plays the tone.
    That keeps CREATE .. DOES> here, still not denying my basic idea
    to make the code within 133-170 line range simpler and nicer:

    : note
    create dup 1+ swap ,
    does> @ 1- get.note CHANNEL0 swap ledcWriteTone drop sustain.note ;

    \ notes in english notation
    1 \ initial value
    note C
    note C#
    note D
    note D#
    note E
    note F
    note F#
    note G
    note G#
    note A
    note A#
    note B
    drop

    \ notes in french notation
    1 \ initial value
    note DO
    note DO#
    note RE
    note RE#
    note MI
    note FA
    note FA#
    note SOL
    note SOL#
    note LA
    note LA#
    note SI
    drop

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)