Juce Diary: coding my first audio apps

Discussion in 'Software' started by Xupito, Dec 27, 2019.

  1. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    I finally have some free time so I coded my first Juce audio app. It's way lame but I figured I'd post here as a diary and perhaps even someone is interested.
    This would be trivial for a medium experienced windows desktop programmer. I'm not.

    So I fought with the Juce library for several hours using an example that comes with it. I added a nice library to read the gamepad input. I made one gamepad axis modify MIDI-controller-like the velocity of every note played.

    Keep in mind this can be compiled as a plugin instead of an standalone app without any changes. Well, the joystick thing wouldn't work because plugins can't receive gamepad input.

    There you have a demo:


    Damn, it's 5 AM... I'm too old for this
    More to come...or not :rofl:

    PS1. In fact I spent way more time trying to compile and test the joystick library than with everything else.

    [Edited.2010.12.29] Goals
    Provisional codename of the app: "Stick Of Joy" (thanks @Lois Lane and @KungPaoFist :rofl:)
     
    Last edited: Dec 29, 2019
    • Like Like x 11
    • Interesting Interesting x 3
    • List
  2.  
  3. Polomo

    Polomo Guest

    More please.
     
    • Like Like x 2
    • Agree Agree x 1
    • List
  4. KungPaoFist

    KungPaoFist Audiosexual

    Joined:
    Nov 20, 2017
    Messages:
    1,691
    Likes Received:
    971
    Location:
    CA
    Does this make dope beats while you play Street Fighter? If not can you make it do that please?

    Thanks!
     
    • Funny Funny x 3
    • Interesting Interesting x 1
    • List
  5. Lois Lane

    Lois Lane Audiosexual

    Joined:
    Jan 16, 2019
    Messages:
    4,778
    Likes Received:
    4,698
    Location:
    Somewhere Over The Rainbow
    There you go, playing with your stick of joy again. Jeez, this is a family website.

    [​IMG]
     
    • Funny Funny x 4
    • Winner Winner x 1
    • Love it! Love it! x 1
    • List
  6. KungPaoFist

    KungPaoFist Audiosexual

    Joined:
    Nov 20, 2017
    Messages:
    1,691
    Likes Received:
    971
    Location:
    CA
    Well.. 1 in 8 has a contractable virus so it's always better to grip your own joystick I always say
     
    • Funny Funny x 2
    • Love it! Love it! x 1
    • List
  7. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    You bunch of m***%&%& :rofl::lmao::hahaha: . I'm still too asleep to reply ... but thanks for the morning laughs
    Noooo HAHAHHAA :rofl::rofl::rofl::rofl:
     
  8. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    I'll do my best, thanks ;)

    To put some context here, my goal is to make a small MIDI app that allows to:
    1. Use the gamepad as a MIDI controller (something I already do but I need two programs. But is very useful and cool)
    2. Virtual piano allowing computer keyboard input.
    3. Besides joystick, of course other MIDI inputs, be it virtual MIDI ports or hardware.
    4. Be able to modify pitch, velocity and the rest of MIDI CC controllers (Pitch and velocity are a bit especial as opposed to Mod Wheel that is just the first MIDI CC)
    5. MIDI programming capabilities like in: Reascript JS, Blue Cat Plug'N'script or JamOrigin MIDI Guitar 2. Midi Guitar has exactly what I'd like to do: only MIDI programming.
    6. This seems a bit hard, but I'd like to make a regular DAW VST plugin if only to start the app and communicate between it and the plugin (the DAW). Without the need of a virtual MIDI port soft. Example: RapidComposer

    More things:
    E1. To not reinvent the wheel, be able to host other plugins. JUCE makes this relatively easy. Incredibly enough shouldn't be the hardest part.
    E2. The MIDI programming is intended to help with programming Virtual instruments: articulations and stuff

    Why point 6?
    Productivity/ease of use: ideally, the DAW project should have everything it needs.
    Meaning by launching it with the VST on some track the app starts automatically including all the data of the project: what buttons axis modify what, which MIDI CCs, programming snippets,....

    Why not just a MIDI vst plugin?
    1. It can't receive Joystick or other MIDI inputs (directly)
    2. There'd be hell trying to manage the focus/visibility of the app window. It'll still be one of the hardest parts
     
    Last edited: Dec 29, 2019
  9. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    Added to the list of features roadmap. At the very deep end of it :rofl:
    I shall use it with protection, namely a condom...
     
  10. KungPaoFist

    KungPaoFist Audiosexual

    Joined:
    Nov 20, 2017
    Messages:
    1,691
    Likes Received:
    971
    Location:
    CA
    You my friend are a godforsakken maverick, ..there are no, .."roads"

    Many men have charged into action, but few have the prudence of caution... Again.., you have the eye of the ever-opened:bow:

    On a side note.. You know juice?? Jedi indeed you are!
     
    Last edited: Dec 29, 2019
  11. cooper

    cooper Member

    Joined:
    May 3, 2015
    Messages:
    74
    Likes Received:
    16
    Sorry if I missed anything, I will just lay out some thoughts on this, I don't have a solution.

    It seems like DAWs are made so that only MIDI messages are sent to the Plugins, otherwise they would allow any input to be used (keyboard, mouse, I don't know).

    I recall doing a theremin like instrument using Supercollider that responded to mouse movement, but this was outside a DAW too.

    Seems like to achieve receiving inputs from sources that do not send MIDI messages, you would need to set cheat the DAW to recognize the Gamepad as a MIDI controller or something.

    This would require a driver or the external tool that translates each message to a MIDI message.

    Is it even possible to override that DAW limitation via a plugin?
     
  12. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    You're right. Good question.

    Developing a driver is very complex. I want to develop a plugin that communicates MIDI data directly with the app.
    How? Using inter-process communication. It's a bit difficult but it can be done.
    The master of Windows audio inter-process communication is jBridge creator. It turns out he also has this nice VST in his site for free:
    https://jstuff.wordpress.com/ipc-midi/

    So in my VST:
    1. Once is instantiated runs the app
    2. Hosts two instances of IPC MIDI plugin (output to app and input from app))

    In the app also two instances of IPC MIDI (input from vst/DAW and output to VST/daw)
    I don't know if I can pull this off, but seems doable. Anyway, using your regular virtual MIDI port will be the first I'll try.
     
    Last edited: Dec 29, 2019
  13. fiction

    fiction Audiosexual

    Joined:
    Jun 21, 2011
    Messages:
    1,914
    Likes Received:
    701
    @Xupito MIDI velocity controlled by a game pad?
    Cool!
     
  14. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    Thanks ;) It's not a new thing, there're old apps I already use. Mainly a Joystick to midi translator and then a virtual piano keyboard.
    But I want to code one myself that makes the process easier.
     
  15. Lois Lane

    Lois Lane Audiosexual

    Joined:
    Jan 16, 2019
    Messages:
    4,778
    Likes Received:
    4,698
    Location:
    Somewhere Over The Rainbow
    Ti rof og. (My secret code, you can use it if it helps)
     
  16. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    Tha f*ck is that? :rofl:
     
  17. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,120
    Likes Received:
    6,365
    Location:
    Europe
    That's the question, Otipux. [​IMG]
     
  18. ( . ) ( . )

    ( . ) ( . ) Audiosexual

    Joined:
    Jul 29, 2013
    Messages:
    1,805
    Likes Received:
    1,180
    what the fuck?

    xupito actually did something productive???

    what the fuck...????
     
    • Funny Funny x 2
    • Agree Agree x 1
    • List
  19. Lois Lane

    Lois Lane Audiosexual

    Joined:
    Jan 16, 2019
    Messages:
    4,778
    Likes Received:
    4,698
    Location:
    Somewhere Over The Rainbow
    That's what I'm just gonna have to call him from now on, Otipux, or just Pux for short.
     
  20. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,239
    Likes Received:
    3,997
    Location:
    Europe
    Okay okay I get it now sonsabit*es :rofl:. Too much coding and too few sleeping. Happy new year and stuff BTW.

    I know, right? It's like when you came back and started making cool music. And now even 3D art. :wink::winker::rofl:
     
Loading...
Similar Threads - Juce Diary coding Forum Date
Juce Diary P02: coding my first plugin Software Oct 20, 2020
JUCE-based audio player? Software Jun 27, 2018
My Mojave Installs Diary on MacBook Pro Retina 2015. Mac / Hackintosh Jul 18, 2018
Fukushima Diary Lounge Jun 23, 2012
Loading...