HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. deniskorg
    • Profile
    • Following 1
    • Followers 0
    • Topics 6
    • Posts 26
    • Groups 0

    deniskorg

    @deniskorg

    1
    Reputation
    6
    Profile views
    26
    Posts
    0
    Followers
    1
    Following
    Joined
    Last Online

    deniskorg Unfollow Follow

    Best posts made by deniskorg

    • RE: How to ignore file.loadAsObjec(), if file is not a valid json

      i use return -1 :)) because this check func is used in other func and and i get numbers for diff errors, and other things

      /// This if statement isn't needed
      if (typeof file !== "object" || file == undefined || file == null) return -1;

      I thought it was a problem for that file and that's why I was getting an error at loadAsObject,
      but your version is a working method ... with loadAsString , and after parseAsJson,

      THANK YOU

      posted in General Questions
      deniskorgD
      deniskorg

    Latest posts made by deniskorg

    • RE: Midi Player Clock Sync (problem)

      I finally managed to reach a solution.

      For me, at least, it works fine for now. I don’t know if there was an easier solution, but for me, being able to sync that grid when I modify the tempo (for the internal clock), this change worked. I’ll leave below the function I modified in the source code.

      MasterClock::GridInfo MasterClock::processAndCheckGrid(int numSamples,
      	const AudioPlayHead::CurrentPositionInfo& externalInfo)
      {	
      	GridInfo gi;
      
          auto shouldUseExternalBpm = !linkBpmToSync || !shouldPreferInternal();
      	
          if (bpm != externalInfo.bpm && shouldUseExternalBpm)
              setBpm(externalInfo.bpm);
      
          if (currentSyncMode == SyncModes::Inactive)
              return gi;
          
          // .. ADDED .. //
      
          // Store last tempo for detection
          static double lastBpm = -1.0;
          static double bpmSmooth = bpm; // Smoothed BPM
          static double lastPpqPosition = 0.0; // Store last PPQ position
      	
          bool tempoChanged = (bpm != lastBpm); // Detect tempo change
           
          if (tempoChanged)
              lastBpm = bpm;
      
          // Interpolate BPM smoothly over time
          double smoothingFactor = 0.1; // Lower = smoother, Higher = faster response
          bpmSmooth += (bpm - bpmSmooth) * smoothingFactor;
      
          // Convert BPM to quarter notes in samples (using smoothed BPM)
          const auto quarterInSamples = (double)TempoSyncer::getTempoInSamples(bpmSmooth, sampleRate, 1.0f);
      
          // Instead of relying on uptime, calculate PPQ dynamically (like in updateFromExternalPlayHead)
          double ppqTime = lastPpqPosition + ((double)numSamples / quarterInSamples);
          lastPpqPosition = ppqTime;
      
          // Calculate grid alignment based on PPQ (like in updateFromExternalPlayHead)
          double multiplier = (double)TempoSyncer::getTempoFactor(clockGrid);
          double nextGridPPQ = std::ceil(ppqTime / multiplier) * multiplier;
          double nextGridSamples = nextGridPPQ * quarterInSamples;
          samplesToNextGrid = nextGridSamples - (ppqTime * quarterInSamples);
      
          if (currentSyncMode == SyncModes::SyncInternal && externalInfo.isPlaying)
          {
              uptime = ppqTime * quarterInSamples;
              samplesToNextGrid = gridDelta - (uptime % gridDelta);
          }
      
          // ... added up to here
      
          if (currentState != nextState)
          {
              currentState = nextState;
              uptime = numSamples - nextTimestamp;
              currentGridIndex = 0;
      
              if (currentState != State::Idle && gridEnabled)
              {
                  gi.change = true;
                  gi.timestamp = nextTimestamp;
                  gi.gridIndex = currentGridIndex;
                  gi.firstGridInPlayback = true;
                  samplesToNextGrid = gridDelta - nextTimestamp;
              }
      
              nextTimestamp = 0;
          }
          else
          {
              if (currentState == State::Idle)
              {   
      			uptime = 0;
      			lastPpqPosition = 0.0; // Added ... to reset PpqPosition
      		}
              else
              {	
                  jassert(nextTimestamp == 0);
                  uptime += numSamples;
                  samplesToNextGrid -= numSamples;
      
                  if (samplesToNextGrid < 0 && gridEnabled)
                  {
                      currentGridIndex++;
                      gi.change = true;
                      gi.firstGridInPlayback = waitForFirstGrid;
                      waitForFirstGrid = false;
                      gi.gridIndex = currentGridIndex;
                      gi.timestamp = numSamples + samplesToNextGrid;
                      samplesToNextGrid += gridDelta;
                  }
              }
          }
      
          return gi;
      }
      
      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Midi Player Clock Sync (problem)

      I didn't find any solution for this...

      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Midi Player Clock Sync (problem)

      think there's a problem with these functions...

      Hise Demo.png

      void MainController::handleTransportCallbacks(const AudioPlayHead::CurrentPositionInfo& newInfo, const MasterClock::GridInfo& gi)
      {
          if(gi.resync)
          {   DBG("test1");
              // t reacts only when I press play from the DAW simulator...
              // when tempo is changed
              for(auto tl: tempoListeners)
                  if(tl != nullptr)
                      tl->onResync(newInfo.ppqPosition);
          }
      }
      
      posted in General Questions
      deniskorgD
      deniskorg
    • Midi Player Clock Sync (problem)

      Hello guys,

      I have a problem,

      If I have a MIDI player and try to press play using startInternalClock(0), even though I have checked the "Prefer External" synchronization option, when I change the tempo from that DAW simulator in HISE, a desynchronization occurs. On the other hand, if I press play from that DAW simulator, even if I aggressively change the tempo, everything works perfectly, and there are no desynchronizations of that grid changer.

      HiseSnippet 2170.3oc6YstaaibElzNLaj1Kc2hEE8WECB1enzXvnKN9xFzFc2R1x1xlJ9RP.1NhbnzrlZF5gijsxh.z929P0Gf9q9HzGg7Fr8LjTVTNLYy5lTrMaBPh8blyYNemybtMLcEbaRP.Wnoms2Tehl9mYXMkIGVaHlxzZWWS+KLjj.4tTGJrgsV0o93f.hilt9xao3QOyszB+yKebUrGlYSlSRS6HN0lzgNhJmSsa4cnddMwNjdzQI3d0xss4rZbO9X.OKajWyGaeFd.YOrhskLzZgCFpo+GMHtkbWesM2frZd7ltatpylE2rjyZXmhX6h4Ia55rd+hXrql9sa3PkbgkDCVgl9spxclZMjeAKRAGQCn88HpEEzr.MGQtI2yQYhJpZ0FR8b5NyQEnooazctaa4H21Wan7PWQet66KC2.MWhjNP8kVDdKu.7JjDd4S.uTfjdBHcqHH8UFV1Bpub9NJ77oFsYRhvEC2SIgRDuZK8OtsQMNvASZNBeFoo.VbkD4VKe9UPv+buGkM6Cd.xhHQ8DXVfOWHQsvLGOhHKbIFHQxYziIi9SnFrATFwzVP.ys201OGblWWFy.hrACCtfsDTmbRwXxJnh26QfpMMQQmCZDN.fGx1iaelh7Cd..szNIU76tbGRtWYytBhKQDZlLr2qAH+Th23xqDW4a5QF4yQ.GHkfYisc3bZwCjU8Gkai7l4SUURt+LnT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+3B55W8gOzWV6+.oSU.r.
      
      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Does HISE Support FLAC Files in SampleMaps?

      @Christoph-Hart and is hard to add this thing of Api :))? In my application, users import samples which create a temporary sample map that they can modify. After modifications, both the sample map and the WAV samples are copied to a custom folder. I need to know how to compress HLAC files in a temporary folder and then copy the ID.ch file to the custom folder

      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Does HISE Support FLAC Files in SampleMaps?

      Is there an API available in HISE for encoding user-created sample maps with HLAC ? I want users to be able to export their sample maps and save the encoded samples in a specific location...

      posted in General Questions
      deniskorgD
      deniskorg
    • Does HISE Support FLAC Files in SampleMaps?

      Does HISE Support FLAC Files in SampleMaps?

      Hi,

      I'm trying to import a SampleMap with FLAC files in HISE, but the audio isn't working. Does HISE support FLAC file format for SampleMaps?

      Thanks!

      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Question About Sample Map Preloading...

      @d-healey

      I made a screen recording that shows what this custom sample map contains. It is for different sample folders, allowing users to import samples and create a custom sample map for their samples.

      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Question About Sample Map Preloading...

      @d-healey the purpose of my proj is the user to use vst in live performance ,
      for keyboard or midi accordion(very popular in my country),
      i wanted to know if exist a solution to change sample map without kill audio engine,
      because in our music style the samples sound it changes very often,
      and that time of preloading is a problem, I thought I could somehow do the preloading in another sampler without killing the current sampler.

      posted in General Questions
      deniskorgD
      deniskorg
    • RE: Question About Sample Map Preloading...

      @deniskorg

      @d-healey said in Question About Sample Map Preloading...:

      Is the purpose to switch between articulations?
      no, not for articulations

      i put a video with project,

      and I've been stuck for a while, because I relied on that lazyload, but I didn't test on large samples, and I continued to work without thinking about this problem that I won't be able to quickly change samplemaps, and I thought that I would could somehow in the background task do preloading in another sampler, while the other modules don't stop

      posted in General Questions
      deniskorgD
      deniskorg