Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[Released] Procedural Music Generator

Discussion in 'Assets and Asset Store' started by Misanthes, Oct 11, 2017.

  1. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Yeah, that makes perfect sense. Most audio programs use Vsti's (in fact, what I used to create the individual mp3's). They do precisely this, and contain a smaller selection of notes and pitch shift accordingly.
    I initially tried adding vst support, but eventually settled on this approach (supporting the vst .dlls was a bit out of the initial scope). It's definitely worth taking a second swing at, as there are a ton of good Vst's out there and it'd make it trivial for users to just add in whichever they need. I'll take another look at this as it would definitely be the ideal setup and improve the generator significantly..

    This is even more desired, since I couldn't ship with any audio not in the public domain, on the Unity store, so the quality is....not great. Adding Vst support would be amazing, since while I still couldn't ship with 3rd party audio, I could easily link to it for users (and there are some great open-sourced vsts. More than individual .mp3 files anyhow).

    If it's any consolation I definitely feel your pain, I had to record and edit individual .mp3's for _every instrument_ :p So, I probably want this feature more than anyone :p I'll definitely take a second crack at this.
     
    Last edited: Nov 26, 2018
  2. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    Even a naive approach where you supply the middle-c version of the note/tone, and then the tool could use unity's built in `audioClip.pitch` - i know, it is kinda-sorta-not what we want, but probably would get somebody 80% of what they want? I found this link (https://stackoverflow.com/a/36793983) which helps transpose a note up/down using the pitch var...
     
    Misanthes likes this.
  3. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Yeah, that's worth a shot I think. Though, I imagine we'll need a note for each octave, I can't imagine the sound surviving a 3 octave pitch shift without significant warping. But, even so, 3 notes per instrument would be a marked improvement. I'll throw together a quick test of this and see how it goes
     
    Jos-Yule likes this.
  4. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    First thank you so much for the update, you can make those as long as your heart desires and the update sounds amazing! :D

    Second, if you manage to add VST support you have no idea how thrilled I'd be! I was just about to start dumping out wav files from my own but it would be amazing if I could load them up and use MIDI to trigger patches etc.

    I can already think of so many instruments that are lightweight that could be used to dynamically create great sounding tracks.

    Last thought for now: if you're going in on VSTs it might be worth considering in the faaaaaaaaaaaar future adding DAW-like channels to assign VSTs to and then instrument tracks could be assigned to channels. If you're having to load an instrument to memory it would save a bunch of RAM to have several instruments utilize a single VST on a channel then the same VST patch loaded multiple times.
     
    Misanthes likes this.
  5. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    And just because we're talking about nerdy procedural music generation stuff, if you're not already familiar with instrument modeling it's pretty neat.

    I've been out of the loop for a while on the topic but I see that Wallander Instruments has now morphed its product into
    https://www.noteperformer.com/ as an example.
     
    Misanthes and wetcircuit like this.
  6. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Yeah, MIDI is another thing I'm hoping to get in someday, but from what I've looked into it, adding support isn't trivial.
    However, there are existing c# MIDI and VST libraries (and even unity assets).
    An alternative if I find I don't have the time to get these done in a reasonable frame is to at least add support for those libraries. Unity won't allow including the libraries themselves into the asset, but I could at least have the code there to support them and point the user to the correct place to download them.

    Also, noteperformer looks awesome :)
     
    OdderOtter likes this.
  7. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    I'm totally down to support another dev if you provide the hooks for integration. To be honest I've looked (which is how I found yours) and haven't had much success.

    It's looks like it's so much nicer to user for sketching out music then the bulky and finicky VSTs that require serious MIDI tweaking. :p

    I've been out of the loop for so long that I just found out that Steinberg released a competitor to Sibelius / Finale recently called Dorico. :eek:
     
    Misanthes likes this.
  8. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    Can't you just almost hear the music played by Noteperformer via Procedural Music Generator? ;)
     
    Misanthes likes this.
  9. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    114
    I just got this. I think it is the best procedural music generator around. I especially like how one can change the parameters and listen. A great tool for musical students and explorers.

    I use the Reaper DAW and free VSTs. I can't see the value of reinventing the wheels. So my perspective is from a Reaper user (and a Unity developer). As a Unity asset I can see the urge to see PMG within the Unity context but I think the code is so great there might be other avenues.

    I think there are a couple of approaches to extending this code and I offer these ideas as a coder:
    - offline midi output files for external DAWs (maybe not too difficult. The C# NAudio library is pretty good)
    - use vst's within Unity (I think this path is fraught with tears and eventual sudden baldness due to excessive hairpulling)
    - realtime midi output (using something like Loopmidi a virtual midi patchbay could possibly get the tones out of PMG into Reaper or any DAW. Would require midi integration)
    - making a VST with the PMG code (obviously not a Unity Asset per se)

    Download of PMG is complete now. So descending into the burrow.

    I'd like to add traditional Japanese pentatonic scales. Any way of doing that? (I'm a lazy coder and count on the generosity of others)

    Cheers!
     
    Misanthes likes this.
  10. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Thanks for the kind words :) They're genuinely appreciated.
    So, an issue I ran into with the Unity store, is that my asset can't contain 3rd party assets of any sort (unless they're CC0. but even other creative commons assets are unacceptable, let alone other copyrighted material). This makes library support a little tricky and meant adding VST or MIDI support required writing the libraries myself (and my time is pretty limited these days, sadly :/ ).What I _hadn't_ considered somehow, until the conversation with neoTypic above a couple days ago, was just adding hooks for the libraries and directing people to the appropriate places to install separately on their end, That's _significantly_ more within the scope of things. The generator mostly just produces an index for each note, which can easily be routed elsewhere for triggering some MIDI or VST library calls (I think. I haven't actually looked into this yet :p )..

    Anyhow, I'm going to try to wrap up this current update quickly here. It contains some significant bug fixes to some embarrassing oversights, GC allocation improvements, a first pass at pentatonic scales, and some much needed UI fixes. So, I'd like to have it out the door soon-ish, as it's stupidly overdue (I got sidetracked with other projects for most of the year. Though, this month is a little crazy with work/holidays, etc so it could be a couple weeks still. And then I plan on starting the library support immediately afterward for a separate update.

    Regarding the Japanese pentatonic scales, having _just_ implemented major/minor pentatonic on my end, I suggest maybe waiting until the update, at which point new ones can be added in pretty trivially I think (they're frankly a pain in the *** to get in currently, due to the way I set things up originally). You're referring to like, the 'Yo' and 'In' scales right? I can try to add them into the update as well. I'm just not super familiar with them, and a little unsure of their implementation as my music theory strength isn't really all that great :p (like, I'm unsure what scales they're able to be played over, what notes they may be discordant with, do they have sensible modal equivalents etc). Coding them to play is fairly straight-forward, it's making sure it doesn't sound terrible that's the tricky part.

    Anyhow, good luck with the generator, feel free to email stickandbindlegames@protonmail.com with any questions, and I'll hopefully have an update for everyone soon!

    Kind regards,
    Tyran
     
    OdderOtter likes this.
  11. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Thanks for the great asset ! I am still new to it and already have questions.
    I am seeing that I can export my own configuration, but it's not clear to me as to how I can actually save specifically generated music as an mp3 file for example or edit a specific measure(if I call this correctly :)

    For example. let's say that I want to use a specific preset and after some tweaking, I want to create 5 2minute tracks. How can I go about that ? And also, is there a way to listen to a track over and over ? Cause if playing stops, a completely new track gets generated on pressing the play button again.

    Thanks ! :D
     
  12. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    While we're making requests… :p

    1. I would like a Theme Repeat option that changes the last measure, so depending on how many times it's set to loop the last cycle in the loop will be varied:

    A-A-B
    A-A-A-B
    …etc

    I think it could go here, in the Theme/Repeat dropdown:

    Screen Shot 2018-12-07 at 6.33.58 AM.png

    2. I'd also like to set individual layers to repeat half/double as often as the main theme, so:

    piano: AABB
    bass: AAAA

    ...but from the way the interface is organized (Repeat is a function of the whole, not the instrument), I'm guessing that might be difficult.

    3. It's really hard to build a rhythm section that changes with groups in only 10 instruments… I guess the thing to do is to bounce the percussion into an audio track and load it as a new percussion instrument.

    Maybe there could be an "instrument" that is for audio clips, adjusting the clip length to fit tempo, or designed to switch to a variant clip as the theme changes (like a percussion instrument with multiple audio files, but the rhythm clip switches to a variant and repeats it).
     
    OdderOtter and Misanthes like this.
  13. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    That's a fantastic idea. Currently, yeah, it's all tied together, but I can easily decouple the instruments from repeating. However, the chord progression / key changes will probably have to be locked down to keep everything sensible, but I think that'd be acceptable.I'll add it to the list! I think the hardest thing will be making the UI/UX sensible for this, but I figure if I default to all repeat together and you have to toggle the instrument's repeat lengths individually it'll work out okay

    As an fyi, on the unlikely chance someone is waiting on me, I'm running a bit behind and probably won't be done with these update changes until near the end of the year (I'll get some decent holiday time off work to dig into things).
     
    OdderOtter and wetcircuit like this.
  14. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hey Misanthes, I think you may have missed my post right above :D If you have a bit of time, could you please take a quick look ? Thanks a lot !
     
  15. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    I did indeed miss it, sorry!
    Unfortunately, it does not record out an mp3, but the asset is instead intended to just run in the background in real-time in your game. So, for example, after exporting a configuration you've made, instead of having an mp3 or audio source that you invoke 'AudioSource:: Play()' on in your game for music, you instead load the configuration via code, and tell it to play. Basically like pressing play in the UI editor, but without the UI, so it's just the sound. While it's not exactly predictable, the differences between different plays of the same configuration are fairly negligible over time. In theory, a configuration you've saved should generally 'feel' the same, for any given play-through even though it's randomly generated (with the added benefit that you can now manipulate things to adapt to gameplay events). It's maybe helpful to think of things more in broad strokes and overall feel of how you want the music to sound, rather than a specific set of notes that you like (and, truly, if you _did_ need an asset with specific, reproducible music, don't hesitate to contact me for a refund. It's tricky to present exactly what the generator does, and how it's used, and I totally understand if anyone bought it thinking it was something else).

    Also, In case you missed it, there's a demo scene included that gives a pretty basic overview of controlling the generator via code (and a documentation folder/files with more details), but absolutely feel free to email me if you have questions, It's admittedly a bit of a different approach to what might be expected (I need to update the demo, it could be a bit better/clearer).

    If for some reason, you do need a static configuration, you can use the measure editor tab to save out a specific set of notes. The length is a bit limited, but fairly long (and I can point you to where to extend the length in code if you need).
    And if you _really_ need an mp3, you could probably just download Audacity or your music app of choice and set it to record from your computer's audio channel while playing the generator. That's not ideal, but, it's an option :p

    But, don't hesitate to let me know if I've explained this poorly or haven't answered your question, or entirely missed the point of your question (I'm often susceptible that :p ).
    Kind regards,
    Tyran
     
    Last edited: Dec 8, 2018
  16. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Thank you for the very detailed explanation, I appreciate that ! Will be playing with it a bit, maybe I can use the randomized stream, why not. I did check the demo scene briefly, I will definitely try to incorporate it programmatically. Thanks again !
     
    Misanthes likes this.
  17. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    wetcircuit - I think that's a great idea! As I think I've seen you call out before - it's all about defining the rules of what can happen while letting the asset do its thing. It would potentially allow for the ability to define the song structure's outline while still maintaining the dynamic generation.

    E.g. verse - chorus - verse - bridge - chorus

    SpyrosUn - although perhaps antithetical to the intended purpose, if you find yourself needing to save the audio output there are several options. You might find this link helpful:

    https://www.howtogeek.com/217348/ho...-coming-from-your-pc-even-without-stereo-mix/
     
    Misanthes and wetcircuit like this.
  18. Maxime16

    Maxime16

    Joined:
    Dec 10, 2018
    Posts:
    1
    Hey Tyran,
    I just purchased your asset and I still have difficulties to run it in Unity. Is there a way to use it as a standalone version like the demo ?
    Beside this, can i export to midi ?
    Thanks,
    Maxime
     
    Last edited: Dec 10, 2018
    Misanthes likes this.
  19. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Yeah, it's recommended you create a build of the generator anyway ( Open the Editor UI scene and then File > Build Settings > Build ).
    Though depending on what you mean by difficulties, it may not build. Make sure you've gone through the setup steps detailed in the documentation located in MusicGenerator/Documentation/Setup.txt.
    Feel free to email me if you have further questions. stickandbindlegames@protonmail.com

    It currently doeesn't support MIDI output, it's on the eventual TODO list, but alas.
     
    Last edited: Dec 11, 2018
  20. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Alright, a progress update since I'm running a bit behind:
    Update is still coming along. Holidays were a bit busier than intended, so things are a bit delayed.
    Pentatonic scales are working nicely. I went with a system that also allows you to set custom pentatonic scales (so, for example rather than the standard pentatonic, major/minor, you can select any two specific notes to avoid, which allows for things like the Japense yo scale, or any other number of pentatonic scales). All the performance improvements are done, and I've extracted out all the raw music files (I'd previously lost them :/ ), so can build for android/IOS now. Currently just reworking the loading sequence to properly load assets for Android/IOS and then I should be done with this iteration. I'll then likely release what's currently done (performance improvements, pentatonic scales, improved lead generation, minor bug fixes, Android/IOS support). Oh, I also refactored the PlayAudioClip() method to contain an event with the relevant information to route it through a MIDI library if you have one, and suppress the playing of the clip in the generator if needed. It's not MIDI support in itself per-se, but at least enables the ability to route it to a MIDI library (seems to work fine. I hooked it up through my digital piano/raspberry pi running a MIDI-controlled LED strip and it lights up my LED strip nicely :D. You basically need just a 3rrd party MIDI library. The biggest shortcoming is that the length of the audio clip has to be parsed out to determine the length, and there's no real information for 'velocity' ).

    I've not forgotten all the suggestions though, so once released, I'll start on those. Just don't want to sit on the current work for too long without releasing. Also, at some point, Unity will shift the LTS to 2018, and I'll update the generator to support that (I'm much looking forward to many of the 2018 features, so that will be fun :p ).

    Anyhow, thanks for the patience and support, all. Happy New Year :D
    -Tyran
     
    OdderOtter and wetcircuit like this.
  21. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    114
    Thanks for the update Tyran. It sounds great and thanks for the Yo scale pentatonic additions. Looking forward to hearing this in action.
    Cheers and Happy Holidays to you and yours!
     
    Misanthes likes this.
  22. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Huzzah, got mobile working tonight. :D That was a giant pain in my butt :p
    Anyhow, just need to do some thorough testing for mobile (or as thorough QA as a single person can do :p ), then clean up everything and I can commit.
    Surprisingly the editor, not just the generator _also_ works on mobile. I was mostly hoping for just the backend so it could be used in apps. The UX/UI is a bit garbage since everything is so small so it's too busy for such a small screen. But, it's technically working :p
    Anyhow, still probably a week or two away, but the major roadblocks are past.

    Update 1/27: Just wanted to provide an update: things are still coming along (and still _almost_ done :p ). However, I've only found small amounts of time to work on this, so things are going slowly in small bursts. And testing/tweaking/building for android/ios is considerably more time consuming for me. Anyhow, still actively trying to finish things. I'll avoid giving a hard-deadline, mostly because it's stressing me out being so delayed, and determining how much time I'll have to work on it is guesswork at best :p. But, I'll keep updating here. It's unlikely, but if anyone is actively held up in their development waiting for this, email me and I'll add you to the gitlab repo, you can pull down the current build (it's all working, just needs tweaking, testing, polish, etc at this point).

    Update 2/20: Still coming along. The end is actually in sight, I think. Still going to avoid giving a specific date, but it should be soon.
     
    Last edited: Feb 20, 2019
    OdderOtter and wetcircuit like this.
  23. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Hi, I saw the update on the store, but there was no new info…

    What is the status? Does it "work" on ios? What should we be looking for?
    I am looking forward to procmusicgen for my ios project, but I'm not a pro on that format, so I'm not sure I could troubleshoot….
     
    Misanthes likes this.
  24. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Hey, wetcircuit,
    For 'working-but-still-in-development-builds' I should have those any day now if anyone wants to download from gitlab.

    But, otherwise for the store release, current status is still 'soon' :p Android is 100% working, with all known bugs sorted out. This includes the UI-editor (which will mostly be for tablet users and those with super tiny fingers). Since the UI was mostly working at the start, I decided to include that, but that's been the largest time-sink so far. There's just been countless tiny bugs that have been super time consuming to test/fix on device In hindsight I should have released it as a separate update. C'est la vie.

    For IOS: I had to order an OSX and IOS device in order to make/test builds(I'm not a mac user), they arrived today.
    However, 95% of the work for IOS should have been resolved with anrdoid tasks though, so mostly just confirming that all the data loading/pathing, etc still works is likely mostly what's left to do for IOS (I hope. Because I got super old devices that are going to build sloooowly. This macbook air is from like 2010).
    .
    Then, I just need to write the setup documentation for mobile, clean up the code (it's a mess of defines and duplicate methods at the moment), and all the little things like that but that's a small amount of work.

    I'll probably do a soft release, where i release it quietly and mention it here in this thread, but not change the store front to advertise it. I have some concerns about the loading times on mobile (it loads each instrument separately from an asset bundle in separate coroutines), and it's a little slow to startup so I may need to refactor things differently for the loading process on mobile which will add a bit of time. Anyhow, with a soft release, I'd kind of like a bit of feedback from the current slate of users before advertising it as 'ready' on the store.

    But, as I've mentioned, it's difficult to find solid chunks of time for development at the moment, and building/testing on mobile is a slow and laborious process, so I'm still going to hold off on giving a solid estimate (So far, I've been ridiculously wrong on how much work/ how long things will take, even barring personal-life things out of my control).

    I have a handful of users who would like to be given access to the dev-repositories, once everything is working. That, I'm comfortable saying will be within the next week. Any refactoring on my end is unlikely to affect anyone at that point. Mostly just polish, code-cleanup, etc, at that point. Let me know if you'd like to be added to that list.

    Anyhow, TLDR: it's still nearing completion, closer every day, and is actively being worked on, though development is going slow. I should have working builds for Android/IOS within the next week I think (with a fair amount of confidence in that statement) if anyone wants to download them from gitlab, please email me. And then a 'real, actually done and in the store' release sometime after that, once all performance and other concerns are taken care of. Likely a couple weeks later.

    Kind regards,
    Tyran

    Update 3/9: Still on track for tomorrow I think. Both android/ios are working fine. Going to spend tomorrow refactoring the android asset loading to speed things up (ios is quicker at the moment), but should still have builds available by the evening. There may be an assorted bug or two but I'll be ironing those out through the week. Anyone interested please email me at stickandbindlegames@protonmail.com I'd be more than happy to have additional input/feedback/bug testing.
    The store release will just lag behind after all the i's are crossed and t's dotted :p
     
    Last edited: Mar 9, 2019
    wetcircuit likes this.
  25. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Alright, dev-builds are ready. If anyone needs/wants a copy until a store release is ready, or is interested in testing (I would definitely appreciate any other eyes on this, or feedback before release), email me at stickandbindlegames@protonmail.com and I'll get you the build.
    Store release should be next Sunday I believe for everyone else.

    *Edit**
    Also, I'm strongly considering building the update against the latest stable build (2018.3.x) rather than the 2017 LTS since in theory the LTS should be updating to 2018 very soon. If anyone has strong feelings about this let me know. I'm leaning this way as I get to avoid downgrading the project before releasing it (I work on the stable build at home, generally), only to have to turn around and update it for the LTS in a couple weeks.
    I can also keep a version built against the 2017 LTS around in a repository if anyone happens to need it but I don't want to hold back the updated player.
     
    Last edited: Mar 11, 2019
  26. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    766
    Great news @Misanthes, can you post some sample songs?
     
    Misanthes likes this.
  27. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Haven't made any new ones yet :p Things will _mostly_ sound the same, other than the pentatonic scales (but that's a pretty subtle change). Most of this update is mobile support / performance fixes. Been preoccupied with squashing the numerous bugs on mobile devices but
    I'll try to get some new presets in before Sunday though! (but no promises!)
     
    goldbug likes this.
  28. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Alright. It is (finally) done. I'll submit it in the morning and it should be live in the store in a few days. Thanks to everyone who submit bugs and feedback (and huge thanks to Jean-Luc for the much improved documentation file and Thibault for the kitten images!).

    Final changes are:
    • Mobile support was added for Android and iOS. While the editor scene will run on mobile, the UI is not redone for mobile, so unless you have small fingers, a stylus, or a tablet for a mobile device, usage may be difficult.
    • Pentatonic scales were added, you can select specific notes to avoid, or use the button on the left to enable the ‘default’ pentatonic scales for major/minor.
    • Garbage generation during play was reduced to near zero for the update methods. Other general improvements made as well.
    • MusicGenerator: PlayAudioClip() has had its signature changed. An event for ‘OnNotePlayed()’ has been added. This is to enable the use of MIDI events. Subscribe to this event to use it for MIDI output, and return false if you want to suppress the playing of the clip internally (for example, if you’re using the MIDI event to fire off your own audio file).
    • New Color Scheme :p
    • Updated the project to the latest stable build (currently 2018.3.9f1). This is preparation for the 2018 LTS. Generally I’ll try to stay on the LTS, but since the update to 2018 seems imminent, I’ve gone ahead and adapted most of the code to support it in advance.
    • A couple new presets added “Sneaky” and “Silly March”.

    A couple features mentioned previously did _not_ make it in, though they haven't been forgotten. Just delayed :p My apolgoies. I'll need to update fully to the 2018 LTS soon, at which point I'll take another swipe at them, this time without all the black-hole-that-is-mobile-support work distracting me.

    Edit*
    It's alive! :D Thanks all for your patience. Hope you enjoy the changes. I welcome any/all feedback at stickandbindlegames@protonmail.com.

    Edit2*
    Committing a hotfix to a couple bugs. Also, I inadvertently bundled the wav file resources rather than mp3, so the package assets are waaaay larger than previously. Unity has been super quick about accepting changes though, so hopefully this is up later tonight. Apologies to anyone affected :/
     
    Last edited: Mar 23, 2019
    Hitch42 likes this.
  29. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Hi! Love the new interface!

    I think I've found a bug though: the individual note Pentatonic settings are not being saved correctly.

    Specifically, if the Standard Pentatonic is ticked on, that saves correctly.

    But, for all the ones set to Standard Off, they all copy the top-most instrument in the stack with the Pentatonic setting.

    … or something. They lose their settings.
     
    Last edited: Apr 28, 2019
    Misanthes likes this.
  30. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Oh no. I'll look into this tomorrow and get a fix up. Thanks for the heads up!
    I'll update you with what I find :D

    Edit* Looks like a brain-fart on my end. I'll commit a fix to the store in the morning.
    In the meantime, if it's causing you trouble, you can remove the if-check on ln 333 within InstrumentPanelUI::SetLeadAvoidNotes(), which should resolve things. (note, you still want to set mLeadAvoidSteps.isOn, on line 335. Just without the check on ln 333. That's preventing anything from ever getting set to off :/ ).
    So, it should read:
    Code (CSharp):
    1. for (int i = 0; i < mLeadAvoidSteps.Length; i++)
    2. {
    3.    mLeadAvoidSteps[i].isOn = i == avoid1 || i == avoid2 ? true : false;
    4. }
    Edit** Submit this morning, it should be available to pull down from the asset store soon.
     
    Last edited: Apr 28, 2019
    wetcircuit likes this.
  31. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Hey, it's already up! Thank you for the fast fix! :cool:

    So… not to nit-pick, but is there any reason we couldn't exclude more than 2 notes…?
    Screen Shot 2019-04-29 at 1.38.19 PM.png
     
    Misanthes likes this.
  32. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Hey Wetcircuit,
    Was partly due to the fact that it was meant to let variations on the standard pentatonic scale (which requires 5 notes, only excluding 2). But, on a more practical level, the logic that generates the lead notes already avoids dischordant notes during the rhythm beats (generally avoiding notes that are a half-step above a chord note). It also attempts to not take a step larger than is defined by the 'lead max step' value. But with certain scale/mode configurations if you exclude more than that it can find itself unable to find a sensible note to play. Then things kinda fall apart if we ignore that, where it's not playing as often as it should, or taking large steps, or is ultimately just playing chord notes.
    Considering that given the rhythm can always play a triad, so the scale will have at least 3 available notes, and the pentatonic has 5, I opted to not muddy up the logic to try and fanagle in scales with 4 notes (my music theory could be off, but I'm not sure such a thing is common/sensible anyhow). And the lead-note generation is already a bit wobbly, so I just opted to leave it with pentatonic scales.

    Anyhow, yeah, yes and no :p That was my thinking when writing it anyhow.
    All that said, I think I do see usefulness of limiting an instrument to a few specific scale steps, like the 1st/5th, or just octaves or something. I'll look into this.
    I'm hoping to implement a 'loop station' feature of the measure editor (similar to the 'group' feature of the regular player. But, with the measure editor, it'd of course repeat things. But, in this case, the groups would loop in independently, if that makes sense.). I'll look into adding more robust control over the notes the instruments play while I'm digging into things.
     
    Last edited: Apr 30, 2019
    wetcircuit likes this.
  33. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    While we're entertaining the idea of extra controls…

    This is the one thing I can't control and wish I could:
    Screen Shot 2019-04-30 at 7.16.10 PM.png

    Would love a way to limit to 3 or 4 keys.
     
    neoshaman and Misanthes like this.
  34. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Could you explain that a little, do you mean the ability to limit the key changes to only change within a few keys?
    To note, they key changes are a little on the simplistic side, I just work our way around the circle of fifths randomly clockwise or counterclockwise. (see: https://en.wikipedia.org/wiki/Circle_of_fifths In that diagram for example, we'll change clockwise from C -> G -> D, or counter from C -> F -> Bb). Would limiting the number of steps suffice? So, it never take more than X-number of steps in either direction?

    I can see how that'd be beneficial. It can feel a bit all over the place otherwise. I personally tend to use the key changes super sparingly, so never noticed how that might sound, but in hindsight, yeah, I can see how letting that only take a step or two in either direction would be super helpful.

    I'll throw it on the TODO list!
     
    neoshaman and wetcircuit like this.
  35. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Yeah, after carefully setting everything up, the key changes almost always sound jarringly bad :( especially on the tuning modes. They suddenly sound random or wrong, but I suspect 1 or 2 specific key changes might sound ok….

    :rolleyes: I am embarrassed to admit how much time I spend trying to imagine extra controls squeezed into the editor scene interface, LOL. (I know we can control some of this with code.)
     
  36. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    One more bug, I think….

    Screen Shot 2019-05-01 at 8.27.52 AM.png
    RepeatLength is always reset to 1
     
    Misanthes likes this.
  37. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    The arpeggio / strum length setting is brilliant.

     
    Jos-Yule, neoshaman and Misanthes like this.
  38. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    It's one of my favorites!
    What's funny is it was more of a happy accident. I really was going for more of a guitar 'strum' sound when I originally put it in, just barely offset. But, in playing with it realized it really works fantastic as arpeggios and adds a super interesting sound. Fills a gap where I think the generator fails a bit, in adding some much quicker notes (I feel the generator can sometimes can sound a bit 'plodding' otherwise).
    But I'm glad you like it! :D

    Also, I'll get a fix up for the repeat length, though it may have to wait until the weekend.
     
    wetcircuit likes this.
  39. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Alright, commit a bug fix for the repeat length (apologies that took a week longer than anticipated).
    More notably, Unity updated the LTS to 2018.4. The generator will now target this version for the foreseeable future as of this commit.

    Also apologies, I did not fit in the keychange limiter, upon inspection it will need a bit of love to get working. However, I did take a look into it, and could not reproduce the dissonance you describe, which was your reasoning for wanting to limit the keys (all key changes sounded fine to me, and from a theory standpoint should be okay to my knowledge. The only caveat to that is if I set the rate to 100%, it changes every measure which doesn't really allow your ear to rest into a key and feels a bit unsettling. But, even then isn't dischordant).

    If you happen to find time and wouldn't mind emailing me a configuration where you can reliably hear this, I can take another dig into things. Ideally, all key changes should be safe and sound fine (they're literally the most basic key changes possible), though I don't rule out something maybe being wrong somewhere, depending on the settings, I'm just struggling to reproduce what those settings may be.
     
  40. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Purely my own subjective opinion.
    Thank you for considering our "suggestions" half-baked as they are… ;)

    Here's one more for the back-burner:
    Maybe a syncopation option that could fire notes a half-count early (or late)?

    I use Echo and Echo Delay to try to achieve this, It sort of works.
     
    Misanthes likes this.
  41. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Oh, I'm not doubting at all that it did sound dischordant, just that it wasn't reproducing with say, the default song, for example. Which leads me to think it may be some bit of bad logic with one of the settings (like, maybe the tritone substitution doesn't work well when changing keys, or maybe certain custom pentatonic scales are causing some issue or having the dominant chord odds set to zero or something. Not sure. There's a lot that could maybe go wrong. The feature has definitely been broken before with particular settings.

    To the 'plodding' thing, I think there are two things that would help the most. Being able to speed up things by allowing like 1/32 notes or something for one (the arpeggio option achieves this for example). I initially didn't include them, as it really only worked well with a few instruments, since it plays so fast, and the clips are all pre-recorded, it can sound a bit muddy since they all play over each other.
    The second thing being to add the 'mixed' instruments to more of the instrument varieties. Probably by default. So, not every note that an instrument plays is exactly identical to the last.
    The inconsistent delay thing I tried very early on, but it ended up making the player sound like it was hitching or out of sync :p I think playing in near-perfect rhythm is fine, it's just the same-ness of everything else mixed with most of the instruments playing a bit slowly.

    Both those require recording a whole bunch more instruments, perhaps even starting from scratch (since I don't recall all the settings I used when I originally made them), or replacing the pre-recorded note setup with VSTs (so we can play super short notes).
    It's a big task though. Though, one that would probably provide some pretty big improvements.
     
    OdderOtter and wetcircuit like this.
  42. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    You already know that VST support has my support. :p
     
    Misanthes likes this.
  43. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Hehe, yeah :)
    The last update refactored some methods to better work with existing VST libraries, I just haven't pulled the trigger on rolling my own yet :p
    I may write some explicit wrappers for a couple of the more popular VST libraries with some instructions on integrating them. But, that's still a half measure since I imagine the average person is looking more for plug and play functionality with their assets and not wanting to import 3rd party libraries to get them to work properly.
     
  44. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    Is this project still being supported? Just tried the demo and it seems perfect for my projects.
     
    OdderOtter likes this.
  45. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    It is!
    I didn't get notified of this thread, so sorry for the slow reply, but I'm pretty on top of emails. Let me know if you have any questions at stickandbindlegames@protonmail.com
     
    ayk and Hikiko66 like this.
  46. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    Great to hear! I actually bought the product a couple days before your reply, simply because it's so amazing. I'll definitely email you if any questions com up. Thanks!
     
  47. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    OdderOtter likes this.
  48. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    Hey Wetcircuit! Sorry for slow reply (again, to everyone feel free to reach out directly via email for a quick response).
    I haven't gone through audiohelm's documentation, but if they have exposed a method to control it, they may work together. The music generator provides an event "OnNotePlayed()" you can subscribe to whenever a note plays, containing the relevant information. You can suppress the playing of the note by returning false to the event and route that information wherever.

    If you're trying to drive a midi player, it _does_ lack the velocity value, so you'd need to just pass in some default, but otherwise, it'll provide an index of the note played, the current volume level, instrument etc (and we can tweak that pretty easily if we need additional information).
     
    wetcircuit likes this.
  49. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Well I took the plunge and got Helm, hoping I could get PMG to control it...

    Tyran wrote me a starter script (Thank You!)… and after struggling with it for a few days a friend took pity and added a bit more so I could pass the OnNotePlayed() event to playmaker

    Screen Shot 2020-02-24 at 2.28.46 PM.png


    yadda-yadda playmaker grabs PMG's instrument and routes the notes to Helm's 10 synths – a few hours of noodling later…. :p I made the legato sound as saccharine as possible.



    LOL the Helm synth presets are retro-analog-y. I need to dig in and make some patches that sound more like instruments….

    Thank's again Tyran! :cool:
     
    OdderOtter likes this.
  50. Misanthes

    Misanthes

    Joined:
    Sep 25, 2015
    Posts:
    68
    That's awesome! :D
    I'm glad you got it to work! (though, I'm sorry to hear you still had trouble, you should have hit me up again :p ).
    Let me know if there ended up being anything else that would be helpful to expose in our note played event.
    I should probably pick up AH and include a couple scripts that interface with it in the player
     
    wetcircuit likes this.