Playing WAV files with Ctrlr

Home Forums General Programming Playing WAV files with Ctrlr

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #118281
    Possemo
    Participant
      • Topics: 14
      • Replies: 638
      • Total: 652
      • ★★★

      I saw in the manual of some of Goodweather’s panels that they seem to be able to play wav files. I thought that the Juce audio stuff is not implemented in Ctrlr.


      @Goodweather
      : could you tell me how you made that possible?

      #118298
      proton
      Participant
        • Topics: 19
        • Replies: 94
        • Total: 113
        • ★★

        I did asked Roman about that some time ago and he explained to me that no audio classes are implemented to safe him some headache 😉

        #118303
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          Héhé my friends, it is well indeed possible but via 2 tricks 😉

          The first trick is to run an external command from within Ctrlr.
          The second trick is to avoid the user to load some fancy wav player and thus the player must be native in the OS.
          After searching a bit, you find that rather easily.

          For Windows, the commands are:
          – powershell -c (New-Object Media.SoundPlayer ‘your_wav_filename’).PlaySync();
          – powershell -c (New-Object Media.SoundPlayer ‘your_wav_filename’).Play(); Start-Sleep -s 10; Exit;
          For MacOS, it is:
          – afplay \”your_wav_filename\”
          – afplay \”your_wav_filename\” -t 10

          To run the external command in Lua, it is os.execute(your_command)

          #118312
          Possemo
          Participant
            • Topics: 14
            • Replies: 638
            • Total: 652
            • ★★★

            Thanks for your answer. Yes I already went the way with powershell. I still get the problem that when I include a path in “your_wav_filename” it won’t do anything – it seems that it passes wrong values, maybe for the backslash (\).

            Nice that it does work for MacOs too, thanks.

            Just to tell what I’m trying to do:
            First I thought that goodweathers panels, which cannot send their data to the synth (because tha synth isn’t able to save/restore patches) were somewhat “free of sense” but in fact it can be helpful to keep a patch-sheet within a DAW track. On a vintage Minimoog it would also be very interesting to hear how a patch does/should sound. There were several revisions of the vintage Minimoog and these over 40 years old tail draggers can sound very different. ATM I am spending my little free time to restore my Minimoog to factory specs. I think it is getting close being an acceptable reference for how a patch should sound.

            It will try to record a soundsnippet for each of the Minimoog Model D Patchbook. It would be the nicest if I could integrate the sounds into the panel (via ressources) and make a procedure that saves the .wav to disk to play it back and then delete it.

            No idea if this will work, I will see. But before I should finish the panel for the Korg 05r/w… so this will take a long time.

            #118323
            goodweather
            Participant
              • Topics: 45
              • Replies: 550
              • Total: 595
              • ★★★

              Well, in my Model D and Poly D panels I’m providing all patches from the Minimoog patch book but don’t have the wav files for them.
              I’m also providing some other presets from the Minimoog User manual with associated wav files.
              They don’t have to be stored in resources.
              I have implemented a file browser giving the ability to automatically play (or not) the sound related to the patch. So, you can browse your sounds without doing the actual patching.

              And indeed, people also like the VST/AU versions of the panels because they can store the settings for each of their track.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The forum ‘Programming’ is closed to new topics and replies.
            There is currently 0 users and 56 guests online
            No users are currently active
            Forum Statistics
            Threads: 2,495, Posts: 17,374, Members: 77,605
            Most users ever online was 12 on January 22, 2019 3:47 pm
            Ctrlr