Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Good way to make a teensy based electric piano

  1. #1

    Good way to make a teensy based electric piano

    I've been working on a project fixing up a Yamaha Clavinova clp-123 piano I got hold off with a burnt out motherboard (3 of the ICs are overheating and no sound, so that is at least my assumption).

    I've replaced the motherboard with a teensy 3.6 and figured out how to scan the keys (key array like a standard keyboard with two buttons per key to infer velocity) and output midi to a laptop, and now to the big challenge, run the whole thing directly without a laptop in the loop (I figured out the internal amplifier connections, and that still works). Aim is to make it sound like an actual piano and not like most synth projects I've seen that shift between sine, square and triangular waves.

    I have tried using the wavetable synthesis library, it sort of works but still not happy with it, so was hoping for some suggestions.

    Is there a better solution than using wavetable synthesis for the instrument part to play sound fonts? I've been using the piano from the "GeneralUser GS v1.471.sf2" sound font, which encodes to the smallest file with the sound font conversion software, and I still can only use about 2/3 of the instrument codes before memory runs out, no option for multiple instruments, and I'm not very happy with the sound as well.
    Willing to use a hardware solution rather than just he teensy. I thought of piping the midi out to a raspberry pi, but it's not a great solution due to hardware limitations. The power button on the piano cuts the power (essentially pulling the cord), which the raspberry won't be happy about, and the boot times on the raspberry are also much longer than I'd look.

    Is there a way with the wavetable synthesis software to play with the decay rate of the note? When I let go of the key it take probably 2-3 seconds until the sound dies out, on the laptop it's probably 0.1 seconds. I tried playing a note with amplitude 0, instead of calling stop, it sort of works but seems to cut out slightly too abruptly.

    Also, how many channels (simultaneous keys) would be plausible with the teensy 3.6? (still trying to workout the buffer management for multiple keys on the teensy)

    Thanks for any suggestions and sorry for the long scroll

  2. #2
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    996
    There is a wavetable object in the audio library.

    https://www.pjrc.com/teensy/gui/?inf...SynthWavetable


    Watch this before trying the audio library:

    https://m.youtube.com/watch?v=wqt55OAabVs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •