Search Unity

Koreographer - Audio Driven Events, Animation, and Gameplay

Discussion in 'Assets and Asset Store' started by SonicBloomEric, Sep 15, 2015.

  1. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    No problem! Happy to help! We're very interested in figuring out this issue.

    Thanks for both attaching a screenshot of the settings and testing with the StarlitKoreography demo. We've noticed some really strange numbers show up there that are inconsistent with what we're seeing on our end. I've attached a screenshot that shows what we're seeing.

    Two differences stand out immediately:
    1. The Sample Range - End field is off by one (1 less in your screenshot).
    2. The Window Size field is off by one (1 less in your screenshot).
    This is pretty disconcerting. The only differences are platform (we develop primarily on macOS) and build target (Standalone vs. UWP). What's more, #1 above is simply a reflection of the sample number reported by AudioClip.samples (which may actually be a very minimal [and different] display bug...).

    Could you perhaps try changing the Build Target to Standalone Windows and see if the feature works as expected?
     

    Attached Files:

  2. keviny

    keviny

    Joined:
    Jan 12, 2017
    Posts:
    4
    Thanks Eric, I've noticed that the error pops up as soon as I switch the editor from RMS to FFT and not when I click analyze. It also doesn't let me change those values by typing a new number. If I type a new number in any of the fields it resets to the original or a minimum value (eg: if i try and change window size by typing a new value, it throws the error and resets back to 31) whereas dragging the slider changes the value but the slider position resets itself.

    This seems to imply the error must be in an editor script?

    I'll try changing the project over to a windows standalone build this weekend. It's for a Hololens project which is why ultimately it needs to be UWP.
     
  3. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Well, what's really odd is that the numbers calculated are literally just powers-of-two. This is the code that does the actual calculation to get the Window Size:
    Code (CSharp):
    1. // fftWindowPower is an int in the range of [5,14].
    2. fftWindowSize = (int)System.Math.Pow(2, fftWindowPower);
    Why it's off by one is the mystery. The only thing we can think of is that the implementation for System.Math.Pow() in the .NET runtime used by UWP is somehow returning values that get truncated to one-less than the target value when cast to an int...? Seems far-fetched, but if the issue is resolved by switching to a different Build Target then there's likely something related going on...
    Awesome, thanks! Looking forward to hearing how it goes! If we get a chance over this weekend, we will similarly try to reproduce the issue using our UWP environment on our end as well.

    Very sorry for the inconvenience this is causing. We very much appreciate your patience and help in tracking down the source of the issue!
     
  4. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    @keviny Were you able to try switching the build target to see if it helped?

    For our part, we were able to get our Windows environment up and running (after many, many OS updates) and did a fresh install of Koreographer in a clean project with the Build Target set to Windows Store (SDK: Universal 10). The UI looked identical to the test results in macOS - no issues encountered.

    Do you happen to have any other special settings/assets/plugins in the project? Do you get the same issue when working with an empty project?

    Finally, what version of Windows are you running? And what locale?
     

    Attached Files:

  5. keviny

    keviny

    Joined:
    Jan 12, 2017
    Posts:
    4
    Hi Eric,

    Sorry deadlines have come up and I've had to park my investigation into this. Much thanks for checking it out on your side though, it is weird how it's not working on my end.
    I'm running the latest version of Windows10 Creators Edition on Windows10 Home.

    I'm going to try again this evening.

    Oh, one thing that might be important - I bought the standard version of Koreographer first, then overwrote it with the pro version which I bought after. Could that be having an impact?

    K.
     
  6. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    No worries and no rush! :D

    Interesting. There's nothing terribly suspicious about that but it's good to know as we keep digging.

    This should not have any effect. Our build system ensures that updated files are properly overwritten when upgrading between the two.

    Just to be safe, we ran a quick test of that installation path locally on macOS: everything worked as expected - the FFT analysis panel did not exhibit the issue you've encountered...
     
  7. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    501
    hey i dont understand the difference between standard and pro.

    In standard, if i import a sound clip, basically i can do beat analysis in editor only?
    while pro u can do runtime or something?

    can u elaborate on the differences a bit further? thanks :)
     
  8. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Hi @luniac! Thanks for reaching out. Happy to answer your questions!

    Koreographer does not do any audio analysis at all in either editor or runtime. It is a tool that allows you to set up the tempo map to assist you in placing events in the audio that you wish your game to respond to. With properly configured tempo settings, it also provides you a beat clock, which you can use to drive animations, effects, etc.

    Koreographer Professional Edition has two configurable editor-only analysis functions:
    1. RMS - This allows you to create Curve Payloads (animation curves) that follow the "curve" of the audio's RMS waveform. This is useful for creating "speaker" effects - e.g. a scaling effect based on the volume of the audio itself.
    2. FFT - This allows you to create Spectrum Payloads. Each Spectrum Payload contains multiple snapshots of the frequency spectrum. It is possible to interpolate between these snapshots at runtime with the provided functions. This is most similar to the GetSpectrumData function provided by Unity.
    Both of these algorithms are designed to provide you with a memory-processing tradeoff. The RMS feature can be simulated at runtime by accessing the "played" audio data and processing it directly. The FFT feature provides you the ability to skip the FFT processing required by the GetSpectrumData function at runtime. Both functions also have the benefit of being deterministic, whereas the runtime versions would be susceptible to framerate-based differences.

    For more information on these functions, please see page 18 of the Koreographer User's Guide documentation.

    Please check this image for a full breakdown of the other features. The three major features that the Professional Edition gains over the basic one is audio middleware integration support, MIDI file data conversion, and extra payload types.

    I hope this helps answer your questions!
     
    luniac likes this.
  9. kevincfy

    kevincfy

    Joined:
    Oct 12, 2012
    Posts:
    16
    Hi there! Update:

    Switched over to a different build target (windows standalone) and the same issue persisted. Errors as soon as I open the analyze window.

    Then over the weekend I had to buy a new machine which had an older version of windows on it. FFT spectrum analysis worked fine. Was very surprised. Updated windows overnight and when I came back FFT became broken the same way it is on all my other machines.

    This is the current version of windows I'm running:

    upload_2017-5-24_1-43-26.png

    So it looks like the version of windows does affect things?
     
    Last edited: May 24, 2017
  10. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Hi @kevincfy! Thanks for reporting back! We updated our Windows test environment to the same version that you showed in your post (1703, build 15063.296). Unfortunately, we were not able to reproduce the issue! The FFT window worked perfectly for us, exhibiting the expected boundaries and properly showing the spectrogram preview.

    Theoretically, one way that things could break as you've reported would be if the underlying functions were being called "differently". What is your .NET setup? Have you installed anything custom in your environment? Have you played with Unity's internal mono environment at all?

    I realize that I'm grasping at straws here, but it's the only thing that really comes to mind...
     
  11. kevincfy

    kevincfy

    Joined:
    Oct 12, 2012
    Posts:
    16
    I believe I'm on .NET 4.0 - it is very weird. I've tried resetting layouts, trying new scenes etc. No joy.

    Just going to try it on a new project, give me a sec.
     
  12. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    I would be very interested to hear if this works on a new, empty project but doesn't work in your test project. Fingers crossed we get some extra information!
     
  13. kevincfy

    kevincfy

    Joined:
    Oct 12, 2012
    Posts:
    16
    Hmm.. new project is fine. How weird! So there must be another script in the project interfering with it.

    I'll investigate further and get back to you.

    K.
     
  14. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Thanks! Looking forward to hearing about what you dig up! Places I can think to look include custom Extension functions for the Math/Mathf libraries and possibly even Unity's IMGUI...
     
  15. unitydeveloper2017

    unitydeveloper2017

    Joined:
    Jul 14, 2017
    Posts:
    4
    Hi @SonicBloomEric
    First of all, Koreographer is an awesome package for music game in Unity for sure!
    I am using "Rhythm Game Demo" demo for reference to make my own game.
    From the code, I see the Note Object is moving by UpdatePosition method and the transform is assigned to the position offset from the target by time. But when i build on an android device, the note move seems quite lag and not very smooth transition.
    So is any way to calculate the distance that the note moves in Time.deltaTime? I want this delta so i can move the note by Lerp or Translate for smooth moving.
    I try delta distance = note speed * Time.deltaTime and the effect seems good, the note match the target quite good but i am not sure the formula is correct.
    Another question is can i assume that all notes move by the same "delta distance" in the same frame?


    Thank so much and sorry for my bad of English :)
     
    SonicBloomEric likes this.
  16. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    That is correct!

    Hmm... a little of that is expected - this would be related to how Koreographer processes Time updates based on values reported by Unity's AudioSource (it's not terribly specific!). Depending on your Audio DSP buffer settings and the frame rate of the game, a few things could be happening to cause this. Likely there's some inconsistency with how the Android audio system is requesting samples from Unity.

    Regardless, I'm sorry to hear that you're experience is less-than-stellar here! If you have any further information to share about what you're seeing, we'd love to hear/see it!

    That should be fine, yes. As long as the playback speed remains unchanged, you should have zero issues with this approach. The only time it may be an issue is if you pause the game - but this can also be worked around without much effort (if you even see a problem to begin with!). This method works because the original code also assumes that the speed is specified in "Units-per-Second". You will notice that the "sample rate" is used as part of the calculation - that simply allows us to adjust the "sample time" such that it becomes "time in seconds".

    The only adjustment that I would suggest is to use Time.unscaledDeltaTime instead of Time.deltaTime. This will ensure that your notes stay on-target even when the audio frame rate suddenly hitches or experiences some other issue. (Time.deltaTime is capped by the Time.maximumDeltaTime value. Audio playback is unaffected by this, so your time calculations should also be unaffected by it...)

    Yes, that is a fair assumption. The current implementation has the position update calculation in the NoteObject itself because it attempts to position absolutely (based on the note object's sample position offset from the current music time). This has the added benefit of being more precise and less-prone to floating point accumulation error. That said, it suffers from the issue that you're experiencing - something related to a deeper issue.

    Never a problem (also, it was quite clear)! Thanks for the effort to write us in English! :D

    One quick optimization note: If you aren't adjusting the RhythmGameController.hitWindowRangeInMS or RhythmGameController.noteSpeed values at runtime, then you can move the UpdateHeight() call out of NoteObject.Update() and into NoteObject.Initialize(). It's only located where it is such that you can play with the settings in the Inspector while the game is running to see how the experience changes! If those values don't change there's no reason to calculate it all each frame.
     
  17. unitydeveloper2017

    unitydeveloper2017

    Joined:
    Jul 14, 2017
    Posts:
    4
    Hi @SonicBloomEric
    I wish all publisher have awesome customer support like you :p
    Thank so much! I will try some optimization note to see if it smooths!
     
    SonicBloomEric likes this.
  18. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    115
    i have 2 question :

    Question 1 :
    because File MP3 too big .... So How can i use midi file to Audio play in game ?
    ( i need something easy download for player )

    Question 2 :
    i working with Rhythm Game Demo
    if i am not use audio file in game , the note will Stop ! ..... so how i can leave it and make it keep running ?
     
    Last edited: Jul 29, 2017
  19. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    How big are we talking here? Have you played with the encoding (bit rate, number of channels, etc.) in order to reduce the file size?

    In general, MIDI files cannot be used for audio playback with plain Unity. Something like MIDI Unified would be required.

    That is correct. Koreographer is driven by the audio playhead position: if you stop the audio, you stop the event system from advancing. There are ways around this, of course. One option would be to create a monaural, silent audio file with a low bit rate that matches the length of the original audio file used. You would create a Koreography data that had all the same Koreography Tracks as the one you created with the actual audio file, and then play your actual audio (through MIDI Unified?) and the silent track at the same time. Another option would be to create your own Visor class that is driven either by the system clock (we'd recommend using the Time.unscaledDeltaTime for this) or some timing information that you get from whatever MIDI Music Player system you use. For more on creating your own Visor, please see page 28 of the Koreographer User's Guide in the documentation.
     
  20. unitydeveloper2017

    unitydeveloper2017

    Joined:
    Jul 14, 2017
    Posts:
    4
    Hi @SonicBloomEric
    I want to extend Rhythm Game Demo to have multi song selection. (Each time will play only one song from list of songs)
    So how can I do that? What are the correct way and the best performance for play one song from the list?
    Thank so much!
     
  21. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    Question: what is the best way to get the current closest event of a certain type, as well as how close that event was (perhaps in % of song -≥ sample/totalSamples)? (importantly, including oneOf events that haven't triggered yet)
     
  22. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    [The first thing to note is that the Rhythm Game Demo should not be considered a "Complete Project". Rather, it is a technical demo that provides a working example of rhythm game mechanics built with Koreographer. The purpose is to offer a starting point so that you may customize and built something to your needs.

    That said, I'm more than happy to help provide some advice here!]


    Perhaps the easiest way to accomplish this would be to create one scene per song. In this way, the only thing you'll really need to handle is a "main menu" scene that has the "level select". Your task would be mainly developing a simple system to load selected songs (scenes) and handle "end of song" to switch back to the main menu. (You might do this with a separate Koreography Track that had a single event at the end of the song.) This could also be implemented using Multi Scene Editing features...

    The scene-change approach has the drawback of producing garbage whenever a scene unload occurs. If this causes an unacceptable garbage collection pass for your needs, you could also song changes directly with finer-grain control of the RhythmGameController script and the Koreographer component. The demo cuts a lot of corners for starting up by auto-playing when the scene loads. There is no "Load New Song" control as the demo wasn't intended to handle that side of things. You are encouraged to add that functionality yourself, of course! This approach would effectively keep the main game scene the same, while having you to "only" load/unload Koreography assets. Whether you manage this with Resources, Asset Bundles, or some other mechanism would be up to you. In terms of actually changing the loaded Koreography, you would handle this using the SimpleMusicPlayer.LoadSong API on a reference to the Simple Music Player in the scene (remember to add the SonicBloom.Koreo.Players namespace to your script so that you can access those classes!).

    I hope this helps!
     
    unitydeveloper2017 likes this.
  23. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    This is somewhat outlined in the Rhythm Game Demo. Check out the RhythmGameController's Start method. Effectively, you do the following:
    1. Obtain a copy of the list of events defined in a specific KoreographyTrack (or tracks). See: KoreographyTrack.GetAllEvents.
      • Filter the list into multiple lists, depending on type if you need to. This is similar to what the RhythmGameController does.
    2. Maintain a "next event" index into that list.
    3. In an Update loop, compare the current sample time of the audio (as reported by the Koreographer component or by using the Koreography.GetLatestSampleTime API for a loaded Koreography) to the current sample time of the event at the "next event" index. If the current time is greater-than-or-equal-to the next-event's StartSample, then increment the index in a loop until you either run out of events in the list or find an event that has a StartSample greater than the current time.
      • The loop will help protect you against situations wherein you have two extremely close events that both happened to have been passed in the same frame. This may never happen depending on the density of your events, but it's good to be aware of the potential issue!
    4. Add your own API for retrieving the "closest event" based on that "next event" index.
    As for getting the distance of the event from the current time to the event in percentage of total song length, you might use something like the following:
    Code (CSharp):
    1. int totalSamples = targetKoreo.SourceClip.samples;
    2. float distAwayInPercent = (nextEvent.StartSample - targetKoreo.GetLatestSampleTime()) / (float)totalSamples;
    That should get you what you're looking for, I think.

    I hope this is helpful!
     
  24. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    Very helpful thank you.

    One issue on my end though: when loading a new song (in this case im loading the same song and switching scenes) the Koreographer.GetLatestSampleTime returns -1 constantly (while the song is still playing fine) Any ideas here? (if i remember correctly it actually returns 0 on frame 1 then -1 on every frame after that)
     
    SonicBloomEric likes this.
  25. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    First, you mean Koreography.GetLatestSampleTime(), yes? It's a small but important distinction.

    Second, can you provide a little more information? Are you loading multiple scenes simultaneously? Are you simply transitioning scenes? Do both scenes contain the proper Koreorapher setup (Koreographer component, Music Player or AudioSourceVisor component, proper Koreography registration...)?
     
  26. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    This is one scene that I transition to, and the Koreographer setup is contained within a Globals gameObject that is not destroyed on load (something like DoNotDestroyOnLoad). I do not recall the exact LatestSampleTime() method I'm using. Does it matter? Does one work on 1st load and return -1s on subsequent runs of the same song?

    Thanks
     
  27. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    Note: the SimpleMusicPlayer is also in the same not-destroyed-on-load gameObject (and this game object is not duplicated on scene transition)
     
  28. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Ahh, thanks. That's very helpful.

    It might. Different accessors occasionally have different defaults. The Koreographer times default to -1. The Koreography-based times internally default to -1. That said, it is possible for the Koreography based time to also become -1.

    No, this shouldn't happen. This is indicative of something else going wrong.

    Good to know. That you are still hearing music is a good first-step.

    Quick question: do any of the scenes your loading happen to have a Koreographer component in them?

    Also, what happens if you "hard code" the SimpleMusicPlayer to look at the Koreographer component installed on the "DontDestroyOnLoad GameObject"? Does that change anything?
     
  29. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    Unfortunately I thought of trying something like that already but the SimpleMusicPlayer does not have any method available for setting the Koreographer. It seems only within the Unity UI can it be set. (I am using the cheaper version of Koreographer)

    Thanks for the help
     
  30. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Yes, this is correct. If your Koreographer component is also on the "DontDestroyOnLoad GameObject", could you try using the Unity UI to select that Koreographer component in the Simple Music Player's "Target Koreographer" field?

    Also, how is the song being replayed when the scene changes? What mechanism causes that to happen?
     
  31. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    If its helpful: in both cases the song starting playback is initiated by something like Koreographer.load(track, sample[default=0], autostart[default=true])
    I'll be able to get you the exact code later (apologies).

    As for the other question, yes the SimpleMusicPlayer's target Koreographer is indeed set to be the one via the Unity UI (previously i thought you meant try doing this programmatically instead but that seems not possible due to no setter method)
     
  32. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Ahh, that is helpful, yes. That looks like the SimpleMusicPlayer.LoadSong method. It starts by unloading the current Koreography and then loads the new one, provided the new Koreography reference isn't null.

    Ahh, gotcha. Thanks for clarifying! This means that your setup should bypass the Koreographer component's singleton option and everything theoretically should be fine. Hmm...

    Would you be able to produce a minimal package with a scene setup that reproduces this situation?
     
  33. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    awesome. got it working thanks to our discussion. turns out i thought i was using the Koreographer.instance singleton the whole time but for some reason the singleton wasnt workin on loading the new scene. storing a reference to the Koreographer component in my DontDestroyOnLoad gameobject works fine.

    Thanks again for the help and fast replies!
     
    SonicBloomEric likes this.
  34. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Very glad that to hear that you got it working! Great job working through the issues!! Hopefully everything will go smoothly from here on, but don't hesitate to reach out if you run into any further bumps along the way! :D
     
  35. unity_forum_name_here

    unity_forum_name_here

    Joined:
    Aug 21, 2017
    Posts:
    8
    Is it safe to assume the # of samples per second stays consistent throughout one song
     
  36. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Yes. The samples per second (Sample Rate) of an AudioClip is constant for the duration of the AudioClip.
     
  37. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Hey everyone, version 1.5.0 just hit the asset store! We did a lot under the hood to support some a major new feature (Custom Payloads), but also managed to fit in some other enhancements with this release. Specifically:
    • [Pro] Custom Payload Support! We've heard from many users that they would really like to define their own Payload types. We had to wrangle with Unity's serialization system a bit, but we managed to get it working!
    • [Pro] New Asset Payload! What can you do with an Asset Payload? Why, attach prefabs to audio events, of course! How about Materials or Meshes? Yup! Just about every Asset type (as long as it's supported in-game) can be attached!
    • Playback Anchor! Consider this a step towards AB-looping. The Playback Anchor allows you to control where the audio will reset to when stopped. We've had it for a bit in development and it's already proved itself a handy tool!
    • Audio Scrubbing! We expect that this will please many users: you can now get a preview of the audio at any given location in the Koreography Editor by holding down the [Alt/Option] key and moving the mouse over the waveform! Extremely helpful for quick-tests and fine-tuning!
    And here's the full set of changes that went into v1.5.0:
    • [NEW] [Pro] Custom Payload support! With a flash of inspiration, we figured out how to enable you to supply your own Payload types to the Koreography system. Currently this requires that you also provide a custom KoreographyTrack class to contain them. See the Custom Payload Demo for documentation and a working example.
    • [NEW] [Pro] New Demo: Custom Payload! Alongside the Custom Payload support, we've included a working example in the form of a demo package. This package includes detailed documentation of the feature and a working custom payload type: the MaterialPayload.
    • [NEW] [Pro] New AssetPayload type! The AssetPayload can contain references to Prefabs, AudioClips, or any asset in the Project View.
    • [NEW] Playback Anchor in the Koreography Editor! It is now possible to set a Playback Anchor in the Koreographer Editor. This allows you to specify the location to which the audio resets when playback is Stopped (via the stop button or with keyboard shortcuts). Access this feature by right-clicking on the waveform view.
    • [NEW] Audio Scrubbing in the Koreography Editor! You can now hear a preview of the audio at any point in the waveform view by holding the ALT key and moving the mouse across the timeline. Please be aware that this feature is dependent upon the current zoom level.
    • More responsive zooming! When zoomed out far enough, the Koreography Editor will automatically switch to a logarithmic zoom, enabling you to more quickly move through useful zoom levels.
    • [Pro] Adjust the MIDI Converter to have a fixed width and minimum height to always show available content. The window metrics now match the design intent. Please let us know if this causes any usability issues.
    • Fixed a number of locations in rarely used runtime code that could cause some unexpected allocations.
    • Fix overwriting Koreography references when selecting duplicate objects with separate Koreography specified for a common Koreography field. The Koreography Property Drawer now properly supports reporting "multiple values" in these situations.
    • Fix small bug in zoom level calculation.
    • Fix the path used in New/Load operations on Koreography and KoreogrpahyTrack assets to properly point at the most-recently-used path, if one exists.
    • Fix triggering the API Updater on Unity 5.6 and up when first importing Koreographer.
    • [Pro] Fix an edge in the MIDI Converter wherein notes that would end-and-begin in the same instant (MIDI delta of 0) would be imported incorrectly.
    • [Pro] Fix the contents of the tooltip for the Event ID in the Koreography Track Export tab of the MIDI Converter.
    If you purchased a previous version of Koreographer or Koreographer Professional Edition, v1.5.0 is a free upgrade! :D
     
    Last edited: Aug 25, 2017
  38. vaninadisc

    vaninadisc

    Joined:
    Jan 15, 2015
    Posts:
    5
    We just launched our game on Steam today using Koreographer! You can't see it in the trailer, since we had to have the music track separate for the video cuts, but Koreographer was really great for us. Very easy to use. Very recommended. All the background art synchronizes to the music. We were in production for about a year, and as new features came out we had to keep going back to improve things because it gave us new options/ideas. Even now though we only launched 30m ago, I suddenly want to go back now that I see there's Custom Payload support. Oh well =).


    http://store.steampowered.com/app/657930
     
    SonicBloomEric likes this.
  39. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Holy jebus, that looks amazing! Fantastic work on that and thanks so much for letting us know about it! Wow.

    On a related note, we'd love to add your game to our Showcase! If you're interested, do you mind contacting us with the following information:
    • Name of game/project
    • Video link
    • Any game art/screenshots you would like us to show
    • Team name or members
    • Social media accounts
    • Brief description of the game
    • Website link
    • Store link
    Much of this we could already grab from the Steam page, of course, but this would allow you to add any additional details or links that you'd like presented.

    Regardless, congratulations on shipping and great work on it - it looks phenomenal and we can't wait to play it!!
     
  40. vaninadisc

    vaninadisc

    Joined:
    Jan 15, 2015
    Posts:
    5
    Sent!
     
    SonicBloomEric likes this.
  41. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Great! Thanks so much! We'll work on getting that up! :D

    Edit: It's up!
     
    Last edited: Aug 29, 2017
  42. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,309
    I've discovered a bug in the editor window where if you have a temp section selected, then switch to one earlier in the song, the earlier tempo section's settings get nuked. It may have something to do with there still being focus in the tempo field or something, I'm not sure. I just know my tempo sections kept getting their settings blown away.
     
  43. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Huh, we're unable to reproduce this with v1.5.0. Do you have a gif/screen capture of the bug in action? Or could you provide more specific repro-steps?

    Also, what version of Koreographer and Unity are you currently using?
     
  44. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,309
    I think the repro is to setup two or three tempo sections. Then, on one of the later tempo sections, try typing in a new start sample directly into the field. So if you had a second tempo section that started at, say, sample 10000, if you go to type "20000" into the start sample field for the third tempo section, you'll find that since you start typing and the first several characters you type in will be quantitatively less than 10000, it seems to displace the earlier tempo section's start sample, perhaps to try to keep them from stepping on each other's toes or something? I'm not sure. But it definitely seems to be related to typing the number in to a later tempo section. If you paste a whole value in at once, it doesn't have the problem, nor if you click to the side of the field and drag to slide the value around.

    Additionally, I seem to have discovered that I have a bug caused from, after tracing it back, to the fact that as a song is playing, sometimes the current sample (obtained from GetLatestSampleTime()) winds up being lower than the previous one. The expected behavior, of course, is that as a song plays, each current sample number would be greater than the one before it.
     
    SonicBloomEric likes this.
  45. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Wow. Great find. Thanks so much for the excellent report: we were able to replicate the issue with the repro steps you provided here! What happens is that the editor tracks the index of the Tempo Section being modified. We missed updating this index when the list order changes due to manually typing-out the sample position. As such, the tempo you edit would get bumped up in order but you'd actually be looking at the previous tempo section. The next input you had would adjust that tempo section's value and so-on. Very, very confusing.

    The fix for this will be included in the next release of Koreographer! In the meantime, we suggest using the workaround you already discovered: pasting the value directly into the field (sorry about this!).

    A few questions about this:
    1. This is at runtime, yes? Not in the Koreography Editor, but when playing your scene?
    2. What kind of framerates are you seeing when this occurs?
    3. Which Koreographer player components are you using when this occurs? SimpleMusicPlayer? AudioSourceVisor?
    4. Are you in the editor when this occurs? If so, do you ever put Unity into the background while testing (and thus pausing the audio playback)?
    This will help us get a better sense of the environment that you're in when you experience this issue. It really shouldn't be happening but there are extenuating circumstances where it may occur.
     
  46. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,309
    1. Yes, at runtime.
    2. FPS is in the 150-160 range.
    3. I'm using SimpleMusicPlayer.
    4. This is in editor, but with Unity in the foreground, game view has the focus. Happens even if the game view is maximized. No pausing is occurring. It happens almost immediately after pressing Play.

    Here is how I'm detecting out-of-order samples (in a new, blank scene with only a camera, light, and a GameObject with a Koreographer component, a SimpleMusicPlayer component, and the following script attached):

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using SonicBloom.Koreo;
    4.  
    5. public class SampleTest : MonoBehaviour
    6. {
    7.     private Koreography kor;
    8.     private int lastSample;
    9.  
    10.     void Awake()
    11.     {
    12.         kor = Koreographer.Instance.GetKoreographyAtIndex(0);
    13.     }
    14.  
    15.     void Update()
    16.     {
    17.         if (lastSample > kor.GetLatestSampleTime())
    18.             Debug.Log("Out of order");
    19.  
    20.         lastSample = kor.GetLatestSampleTime();
    21.     }
    22. }
    23.  
    Almost immediately after pressing Play, I start getting "Out of order" sporadically in the console. This is causing difficulty as I am driving gameplay based on sample/song time instead of Time.deltaTime, and I need it to reliably move forward.

    Thanks!
     
  47. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Okay, that should most certainly not be happening. We tested that very script internally and do not receive any output. We're on macOS and had to turn off v-sync to hit those frame rates. Even with ~1ms frame times (somewhere between 400-800fps) we didn't see this issue.

    Don't worry, though: we're committed to helping you figure this out. We have a potential workaround for what we suspect is happening but need to check out a few more things to help ensure that it's really the issue.

    Are you testing on a Windows machine? What version of Koreographer are you using?
     
  48. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,309
    I am on Windows 10, doing a VR application. Unity version is 2017.1, and I just updated to Koreographer 1.5.

    If it helps, I can contact you directly and send over my Koreography file and audio track and any other relevant files.
     
  49. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    619
    Okay. I just tested on macOS 10.12.6 using Unity 2017.1.0f3 and Koreographer 1.5. We're not seeing any messages in the debug output... :/

    This would be excellent. We can report back on this thread once we've identified the issue so that others may benefit! Please reach us at this address!
     
  50. unitydeveloper2017

    unitydeveloper2017

    Joined:
    Jul 14, 2017
    Posts:
    4
    Thank so much!
     
    SonicBloomEric likes this.