Ctrlr – Step by step guide

Home Forums General News and releases Ctrlr – Step by step guide

Tagged: 

This topic contains 21 replies, has 11 voices, and was last updated by  stcryogen 1 year, 4 months ago.

Viewing 20 posts - 1 through 20 (of 22 total)
  • Author
    Posts
  • #51606
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    Hi,
    this is a step by step discovery of Ctrlr. First of all, despite the lack of a manual, we must all congratulate Atom for the creation of this higher level Midi controller software based on lower level components like Juce.
    As several contributors mentioned, there is in fact a lot of info in the forum but it is indeed spread on many topics as it is also spread in the different panels made available for download or provided as demo purposes.
    This has of course been (and still is) a big source of info!

    So, I used the goal of building a panel for my Sub37 as red thread for a Step by step guide. I will extend it gradually further…

    Enjoy reading and thx again to Atom and all contributors to Ctrlr and this forum!

    EDIT: In this post, I will always keep the last “released” version of the document. There is another post where I will put the “in dev” version.

    2016-03-31 v1.3 Different changes. Corrections in Lua code.

    • This topic was modified 4 years, 1 month ago by goodweather goodweather.
    • This topic was modified 4 years ago by goodweather goodweather. Reason: v1.1
    • This topic was modified 3 years, 12 months ago by goodweather goodweather.
    • This topic was modified 3 years, 12 months ago by goodweather goodweather.
    • This topic was modified 3 years, 4 months ago by goodweather goodweather. Reason: Reason: v1.3
    Attachments:
    You must be logged in to view attached files.
    #51643
    Puppeteer
    Puppeteer
    Participant
    • Topics: 15
    • Replies: 180
    • Total: 195
    • ★★

    Thanks for doing this. I’d be keen to add to it with my experiences of LUA from my Kurzweil PC3 panel, and thought of doing something similar. If you are open to it, I’d be keen to add to your document as I develop the Kurzweil PC3 panel. It’s uses some unusual MIDI so I have to craft a lot of stuff manually in LUA.

    Just answering some of the questions you have in the document.

    Regarding the colours, the first hex pair is normally alpha (or transparency)

    Regarding the librarian section and sending parameters, normally these are done directly when you move the parameter (and in fact if you receive a patch and set the component to match a value it will send them by default as well – there is a post on the forum about how to workaround this). You could use LUA to send a dump or all panel components at once.

    For the bubble, there is a parameter in the panel on the right to enable this for particular components. I think it’s down near the bottom. I need to look at this some more as I’d like it to show a mapped value rather than the MIDI value, but that’s for another day.

    For the file extensions you pretty much have it right. The various options control file size and whether resources are collected together with it and packaged as a binary.

    One other thing is that to create the VST’s etc you need to open your panel in the VST version and then export it from there. The VST version has different export options than the standalone. That’s the only way that I know of to build protected instances (without the panel menu). This is important to me as some of the info I have on the Kurzweil PC3 I’ve received under NDA so can’t share it.

    The Puppeteer
    http://godlike.com.au

    #51652
    dreamer
    dreamer
    Participant
    • Topics: 0
    • Replies: 9
    • Total: 9

    Wow, this is very cool. Thanks for the hard work goodweather!

    Hopefully this can grow in to a more complete and generic guide to building panels 🙂
    (I will definitely take it as a guide for my coming endeavours)

    #51670
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    Thx to both of you!
    Yes sure, I think we can join forces to build something nice and by this contribution complete the work done by Atom.
    I will correct the yellow questions with your feedback Puppeteer.
    I will also think about a new Chapter structure so we make the doc more generic.
    For example:
    – Part1= Panel basics (using 2 or 3 examples each time?)
    – Part2= Panel Advanced
    – Part3= LUA programming (a summary of typical propgramming stuff: variables, loops, input/outputs…) Summary only! The goal is not to write a guide on how to program but to present LUA to people knowing how to program in other languages
    – Part4= Using LUA for a Librarian – Basics
    – Part5= Using LUA for a librarian – Advanced (?)
    – Part6= Graphics – EG curves display
    – Appendix
    – Reference guide of Ctrlr (? quite difficult to maintain, maybe too long…?)

    What do you think?

    After we agree on something, then we can organize our work and maybe exchange outside the forum then publish our result… Anyway, no hurry… I’m writing a paragraph each time I’m discovering and using something…
    And now it is vacation time 🙂

    #51689
    Puppeteer
    Puppeteer
    Participant
    • Topics: 15
    • Replies: 180
    • Total: 195
    • ★★

    I’m happy to start on Chapter 3. It will be a quick summary of what I know of LUA generally followed by a bunch of examples on accomplishing some specific tasks.

    I imagine it will expand over time.

    Part 4 and Part 5 I’ll be able to contribute more to as time goes by and I start getting into the MIDI In part of the plugin.

    The Puppeteer
    http://godlike.com.au

    #59408

    memorysplice
    Participant
    • Topics: 14
    • Replies: 59
    • Total: 73

    I am looking forward to the day there is documentation on how to create a librarian. That would be so clutch.

    #68773
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    v1.3 published (different corrections)
    I’ll include a librarian in the 2.0 as I’m doing that for the Pro2 panel

    #68775

    memorysplice
    Participant
    • Topics: 14
    • Replies: 59
    • Total: 73

    Is there a link for download?

    #68776

    memorysplice
    Participant
    • Topics: 14
    • Replies: 59
    • Total: 73

    I think I found it. Thank you!

    #69023
    Synthetech
    Synthetech
    Participant
    • Topics: 13
    • Replies: 70
    • Total: 83

    very nice!

    this has already helped me a few times to figure out some things.
    thanks so much for your work 🙂

    this should be stickied up somehow…

    #69082
    Puppeteer
    Puppeteer
    Participant
    • Topics: 15
    • Replies: 180
    • Total: 195
    • ★★

    There’s a lot of additional info in the InDev document that can be found here – http://ctrlr.org/forums/topic/ctrlr-step-by-step-guide-in-dev-version/

    I’ll hopefully be getting back into coding my next panel soon and will add more. I’ll also be trying to build a librarian, so I’m sure there’s going to be a lot built into the guide between Dominique and myself.

    The Puppeteer
    http://godlike.com.au

    #69085
    Synthetech
    Synthetech
    Participant
    • Topics: 13
    • Replies: 70
    • Total: 83

    I’ve got a fairly good understanding how to use dasfaker’s graphical ADSR and ADBSSR envelope generators if you need help with them.
    The ADBSSR he made was actually done for one of my projects, then I had to figure out how to make three of them.. DCO1, DCO2 & a VCF set of EG’s… all inside their own tabs.

    #69086
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    Thank you but actually I have also used them but adapted them further to be fully flexible in size (height/width) instead of having to modify the code and to handle a variable number of segments 🙂
    Plan was to re-create a panel just containing them with some explanations but I didn’t find the time yet.

    I did this for the SUB37 panel but also now on my Pro2 panel (and there are 5 of them).

    This will of course be added in the Guide 2.0

    Attachments:
    You must be logged in to view attached files.
    #69103
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 582
    • Total: 595
    • ★★★

    Hi goodweather, your graphic env code sounds interesting. Would love to look into it. Btw. it would be nice to visualize a looped env too but I have no idea how to achieve this. I mean something like on the sounddiver screenshots I attached (1st env-loop off, scond env-loop on).

    Attachments:
    You must be logged in to view attached files.
    #69107
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    Hi Poss, can you open another post with this question so we can continue the discussion there?
    Quick answer: can be easily fixed by adding a number of loops (each loop adds 2 segments) between Release level (at 0 on your graph but not always 0) and the Sustain level then back to Release level.

    #69277
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 582
    • Total: 595
    • ★★★

    The loops are done. It was not as hard to do as I expected.

    #69746

    Peter_EP
    Participant
    • Topics: 5
    • Replies: 19
    • Total: 24

    These tuts are a great help, I’m sure anyone who sees them will agree they are very good. I’m glad they are now in pdf format, the previous docx was causing me problems. As for a central place for the tuts/info, I know Audacity have a Wiki page:
    http://wiki.audacityteam.org/wiki/Audacity_Wiki_Home_Page

    So maybe something similar for Ctrlr??

    BTW: I’d like a way to call up and view the property list with definitions, at present I call what() from any component method call, I’d like to be able to enter a command into the LUA Console but don’t know the syntax. Also with defintions so I know what parameters are available etc.

    ADSR envelope tuts/code would be very helpful for many people, I think we all will have variations on a theme so a whole chapter on this alone would be good!

    Keep up the good work, I think so many people have a need for a MIDI programming environment and Ctrlr is the best I’ve seen, ever!

    #69750
    goodweather
    goodweather
    Participant
    • Topics: 40
    • Replies: 392
    • Total: 432
    • ★★

    I agree with you about the Wiki and the need for help but I don’t have the control of that and atom is probably already spending a lot of time coding the software so he has probably also no time for writing an help/wiki.

    ADSR tuts is laready included in the Step by Step 2.0 guide I’m busy to write. You will have ADSR but also DADSR and DAHDSR. All the same principle…

    WIthin Ctrlr you have only what() available.
    To learn about syntax and find interesting functions, the only place are:

    • the different folders in https://sourceforge.net/p/ctrlrv4/code/HEAD/tree/nightly/Source/ and within those the end of the .cpp files (but sometimes also the code of each function). Look for example at Lua/CtrlrLuaUtils.cpp
    • the Juce API that Ctrlr is based on https://www.juce.com/doc/classes. Here you can see all the different functions available for a certain object (search with first letter) and see the possibilities and syntax. Please note that it doesn’t mean the function is available in Ctrlr but in most cases well.

    I learned a lot with those but it takes also a lot of time…

    #70597

    explodingPSYCH
    Participant
    • Topics: 1
    • Replies: 2
    • Total: 3

    Does your step-by-step cover segmenting one CC for multiple controls?

    I recently made a post about how I’m trying to make a panel for the SH-1oh1 MIDI mod. It adds velocity via MIDI and uses one CC value to set the destination of the velocity to multiple locations. 1-13 is one value, 14-28 is another, and so on.

    I’m trying to make either a pull down list, or a knob that will show me which value I’m at without having to get into making a background image for the knob. Is there a way to set one CC controller to jump to specific values, like “1” for the first value, 14 for the second and so on in a stepped fashion and also give me a read out of a label for that value? Or other options?

    #70598
    fundorin
    fundorin
    Participant
    • Topics: 8
    • Replies: 66
    • Total: 74

    I feel like it might be easier for you to use if..then statements to do what you want with lua script. Like:

    
    if 1 <= modulator_value <= 13 then
      do_something
    elseif 14 <= modulator_value <= 28 then
      do_something_else
    end
    

    But I would use separate modulators with different min/max values and same CC.

Viewing 20 posts - 1 through 20 (of 22 total)

You must be logged in to reply to this topic.

There is currently 0 users and 30 guests online
No users are currently active
Forum Statistics
Threads: 2,242, Posts: 15,790, Members: 55,911
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!