Пример #1
0
        public PluginController() : base(
                "Synth.NET",
                new VstProductInfo("Test", " ", 1),
                VstPluginCategory.Synth,
                VstPluginCapabilities.None,
                0, 1)
        {
            MidiListener   = new MidiListener();
            AudioProcessor = new AudioProcessor(this);
            PluginUI.Instance.PluginController = this;

            ParametersManager.SetParameters(AudioProcessor.CreateParameters());

            ParametersManager.SetPrograms(new Dictionary <string, string>
            {
                { "Sine", Properties.Resources.Sine },
                { "Wooble", Properties.Resources.Wooble },
                { "Whistle", Properties.Resources.Whistle },
                { "Synth", Properties.Resources.Synth1 },
                { "BassLong", Properties.Resources.Bass_Long },
                { "BassShort", Properties.Resources.Bass_Short },
                { "Siren", Properties.Resources.Siren },
                { "8BitSeq", Properties.Resources._8bitMadness },
                { "WobbleSeq", Properties.Resources.WoobleMad }
            }.Select(x => ParametersManager.CreateProgramFromSerializedParameters(x.Key, x.Value)));
        }
Пример #2
0
 void Start()
 {
     _processor = AudioProcessor.FindObjectOfType <AudioProcessor> ();
     // _processor.onBeat.AddListener (onOnbeatDetected);
     _currentRowSpawnIndex = 0;
     StartCoroutine(SpawnPlatformsByTime());
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EffectDescriptor"/> class.
 /// </summary>
 /// <param name="effect">The effect.</param>
 /// <param name="outputChannelCount">The output channel count.</param>
 public EffectDescriptor(AudioProcessor effect, int outputChannelCount)
 {
     EffectPointer      = IntPtr.Zero;
     Effect             = effect;
     InitialState       = true;
     OutputChannelCount = outputChannelCount;
 }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(onOnbeatDetected);
        processor.onSpectrum.AddListener(onSpectrum);
    }
Пример #5
0
        public PluginController() : base(
                "Syntage",
                new VstProductInfo("Study Synth", "lis355", 1000),
                VstPluginCategory.Synth,
                VstPluginCapabilities.None,
                0,
                new FourCharacterCode("SNTG").ToInt32())
        {
            Log.Print("Initializing");

            MidiListener   = new MidiListener();
            AudioProcessor = new AudioProcessor(this);
            PluginUI.Instance.PluginController = this;

            ParametersManager.SetParameters(AudioProcessor.CreateParameters());

            ParametersManager.SetPrograms(new Dictionary <string, string>
            {
                { "Sine", Properties.Resources.Sine },
                { "Synt1", Properties.Resources.Synt1 },
                { "Synt2", Properties.Resources.Synt2 },
                { "Synt3", Properties.Resources.Synt3 },
                { "Butterfly", Properties.Resources.Butterfly },
                { "Telephone", Properties.Resources.Telephone },
                { "Elastic", Properties.Resources.Elastic },
                { "FineFeedback", Properties.Resources.FineFeedback }
            }.Select(x => ParametersManager.CreateProgramFromSerializedParameters(x.Key, x.Value)));
        }
Пример #6
0
    void Start()
    {
        if (shootAt == null)
        {
            shootAt = Camera.main.transform;
        }

        soundEffect = GetComponent <AudioSource>();
        if (soundEffect == null)
        {
            Debug.LogError("Requires AudioSource component");
        }

        pool = GetComponent <ObjectPooler>();
        if (pool == null)
        {
            Debug.LogError("Requires ObjectPooler component");
        }

        if (shooter0 == null || shooter1 == null)
        {
            Debug.LogError("Requires shooter transforms");
        }

        Time.fixedDeltaTime = 0.001f;

        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(OnBeatDetected);
    }
Пример #7
0
    // Use this for initialization
    void Start()
    {
        game = GameManager.getActive();

        for (int i = 0; i < colors.Length; i++)
        {
            float c = (1.0f / 12.0f) * i;
            colors[i] = new Color(c, c, c);
        }

        colors[3]  = (Color) new Color32(78, 205, 196, 255);
        colors[4]  = (Color) new Color32(85, 98, 112, 255);
        colors[5]  = (Color) new Color32(213, 222, 217, 255);
        colors[0]  = (Color) new Color32(203, 232, 107, 255);
        colors[1]  = (Color) new Color32(207, 240, 158, 255);
        colors[2]  = (Color) new Color32(168, 219, 168, 255);
        colors[6]  = (Color) new Color32(121, 189, 154, 255);
        colors[7]  = (Color) new Color32(59, 134, 134, 255);
        colors[8]  = (Color) new Color32(11, 72, 107, 255);
        colors[9]  = (Color) new Color32(196, 77, 88, 255);
        colors[10] = (Color) new Color32(255, 107, 107, 255);
        colors[11] = (Color) new Color32(199, 244, 100, 255);

        AudioProcessor processor = FindObjectOfType <AudioProcessor> ();

        processor.onSpectrum.AddListener(onSpectrum);

        nextGeneration = game.getPlayerZ();
        NewCoinStreak();
    }
 private void btnParse_Click(object sender, EventArgs e)
 {
     txtParsedText.Text = txtAudioResult.Text = string.Empty;
     if (processor != null)
     {
         processor.Dispose();
     }
     if (string.IsNullOrEmpty(txtFilePath.Text))
     {
         MessageBox.Show("Please choose a WAV file", AppConfig.GetConfigValue("APP_MSG_TITLE"), MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     try
     {
         processor                   = new AudioProcessor(AudioSourceMode.AudioFile, txtFilePath.Text);
         processor.PlayFile          = chkPlay.Checked;
         processor.SpeechRecognized += OnSpeechRecognized;
         processor.Start();
     }
     catch (Exception ex)
     {
         processor = null;
         MessageBox.Show(ex.Message, AppConfig.GetConfigValue("APP_MSG_TITLE"), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        public static string StageBloomD(Book.Book book, BookServer bookServer, WebSocketProgress progress, Color backColor, AndroidPublishSettings settings = null)
        {
            progress.Message("PublishTab.Epub.PreparingPreview", "Preparing Preview");                  // message shared with Epub publishing
            if (settings?.LanguagesToInclude != null)
            {
                var message = new LicenseChecker().CheckBook(book, settings.LanguagesToInclude.ToArray());
                if (message != null)
                {
                    progress.MessageWithoutLocalizing(message, MessageKind.Error);
                    return(null);
                }
            }

            _stagingFolder?.Dispose();
            if (AudioProcessor.IsAnyCompressedAudioMissing(book.FolderPath, book.RawDom))
            {
                progress.Message("CompressingAudio", "Compressing audio files");
                AudioProcessor.TryCompressingAudioAsNeeded(book.FolderPath, book.RawDom);
            }
            // We don't use the folder found here, but this method does some checks we want done.
            BookStorage.FindBookHtmlInFolder(book.FolderPath);
            _stagingFolder = new TemporaryFolder(StagingFolder);
            var modifiedBook = BloomReaderFileMaker.PrepareBookForBloomReader(book.FolderPath, bookServer, _stagingFolder, progress, settings: settings);

            progress.Message("Common.Done", "Shown in a list of messages when Bloom has completed a task.", "Done");
            return(modifiedBook.FolderPath.ToLocalhost());
        }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EffectDescriptor"/> class.
 /// </summary>
 /// <param name="effect">The effect.</param>
 /// <param name="outputChannelCount">The output channel count.</param>
 public EffectDescriptor(AudioProcessor effect, int outputChannelCount)
 {
     EffectPointer = IntPtr.Zero;
     Effect = effect;
     InitialState = true;
     OutputChannelCount = outputChannelCount;
 }
    // Use this for initialization
    private void Start()
    {
        objectPooler = ObjectPooler.Instance;

        _audioSource = GetComponent <AudioSource>();

        _audioProcessor = new AudioProcessor(1024);

        // Bass
        _audioProcessor.ProcessClip(
            _audioSource.clip,
            new SpectralFluxAnalyzer(1024, _audioSource.clip.frequency, 2000, 2499),
            analyzer => { _bassAnalyzer = analyzer; });

        // Midrange
        _audioProcessor.ProcessClip(
            _audioSource.clip,
            new SpectralFluxAnalyzer(1024, _audioSource.clip.frequency, 2500, 4000),
            analyzer => { _midRangeAnalyzer = analyzer; });

        // High
        _audioProcessor.ProcessClip(
            _audioSource.clip,
            new SpectralFluxAnalyzer(1024, _audioSource.clip.frequency, 4000, 20000),
            analyzer => { _highRangeAnalyzer = analyzer; });
    }
Пример #12
0
 public void Init(AudioProcessor source)
 {
     _source = source;
     _source.onBeat.AddListener(CollectData);
     CreateFolder();
     ClearFile();
 }
Пример #13
0
        static void Main(string[] args)
        {
            // Write names of the songs you want to visualize
            string[] files = new string[] {
                "Home.wav",
            };


            AudioRecognitionLibrary.Recognizer.AudioRecognizer recognizer = new AudioRecognitionLibrary.Recognizer.AudioRecognizer();

            foreach (var file in files)
            {
                // Compute BPM and write result into the console
                var audio = Recorder.GetAudio($"Resources/Songs/{file}");
                Console.WriteLine($"FILE: {file}");
                Console.WriteLine(recognizer.GetBPM(audio, true));


                // Run visualisation
                AudioProcessor.ConvertToMono(audio);
                // Change last parameter to see other visualisations
                var window = new global::Visualizer.Visualizer(audio.Data, audio.Channels, audio.SampleRate, VisualisationModes.Frequencies);
                window.Run();
            }
        }
Пример #14
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
Пример #15
0
 public void Start()
 {
     _Statistic        = new Statistic(Track.Duration);
     _DownloadFilePath = DownloadPathConfigurator.Configure(OutputDirectory, AudioProcessor.TargetFileExtension, Track);
     AudioProcessor.Start(_DownloadFilePath);
     Active = true;
 }
Пример #16
0
    private void Start()
    {
        _audioSource    = GetComponent <AudioSource>();
        lastTimeSpawned = Time.timeSinceLevelLoad;
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(OnBeatHit);
    }
Пример #17
0
    // Use this for initialization
    void Start()
    {
        //Select the instance of AudioProcessor and pass a reference
        //to this object
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(onOnbeatDetected);
    }
Пример #18
0
 void Start()
 {
     _processor = FindObjectOfType <AudioProcessor>();
     _processor.addAudioCallback(this);
     _beginning = System.DateTime.Now;
     Increments = Length / 5;       //for loading time
     Debug.Log("length" + this.Length);
 }
Пример #19
0
 // Use this for initialization
 void Awake()
 {
     audio_manager = SceneAudioManager.Instance;
     audio_process = AudioProcessor.Instance;
     Pause         = false;
     PauseHUD      = false;
     Tracks        = new List <AudioClip>(Resources.LoadAll <AudioClip>("Audio/"));
 }
Пример #20
0
 public void LoadContent(Game1 game)
 {
     State = Constants.Scene.SCENE_STATE.LOADING;
     gameObjectManager.LoadContent(game);
     ParticlesProcessor.LoadContent(game);
     AudioProcessor.LoadContentAndPlay(game);
     UIProcessor.LoadContent(game);
 }
Пример #21
0
    void Start()
    {
        //Select the instance of AudioProcessor and pass a reference
        //to this object
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.addAudioCallback(this);
    }
Пример #22
0
        public static String createReportAudio()
        {
            string[] files = Directory.GetFiles(@"C:\hypai\hyp_connect\App_Data\cache");

            AudioProcessor.Concatenate(@"C:\hypai\hyp_connect\App_Data\Reports\audio\conct.wav", files);

            return("");
        }
Пример #23
0
    // Use this for initialization
    void Start()
    {
        m_Color = GetComponent <ScoreUI>().textColor;
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(onBeat);
        processor.onSpectrum.AddListener(onSpectrum);
        colorBeat = 0.0f;
    }
Пример #24
0
    //private bool spawned;

    // Use this for initialization
    void Awake()
    {
        spawnPoints     = this.GetComponentsInChildren <Transform>();
        audioController = this.GetComponent <AudioSource>();
        audioProcessor  = this.GetComponent <AudioProcessor>();
        bossSong        = new BossSongScript();

        GameController.getInstance().suscribeToGame(this);
    }
Пример #25
0
    void Start()
    {
        audioProc = FindObjectOfType<AudioProcessor>();
        audioProc.addAudioCallback (this);

        cubeAMat.color = colorA;
        cubeBMat.color = colorB;
        print ("colored");
    }
Пример #26
0
    // Use this for initialization
    void Start()
    {
        m_Material = GetComponent <Renderer>().material;
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.onBeat.AddListener(onBeat);
        processor.onSpectrum.AddListener(onSpectrum);
        colorBeat = 0.0f;
    }
Пример #27
0
    // Use this for initialization
    void Awake()
    {
        S         = this;
        callbacks = new List <AudioCallbacks>();

        initArrays();

        ready = false;
    }
Пример #28
0
 public TrackDownloadService(TrackModel track, AudioProcessor audioProcessor, IDownloadPathConfigurator downloadPathConfigurator)
 {
     Track                    = track;
     AudioProcessor           = audioProcessor;
     DownloadPathConfigurator = downloadPathConfigurator;
     AudioMetaData            = new AudioMetaData();
     Mp3MetaData              = new Mp3MetaData();
     Cleanup                  = true;
     OutputDirectory          = "download";
 }
Пример #29
0
    void Start()
    {
        //Inicializar indicadores del beat
        iDefault = GameObject.Find("beat_marker_red");
        iOnBeat  = GameObject.Find("beat_marker_green");  iOnBeat.SetActive(false);
        //SET AUDIOCALLBACK, En ese objeto caera el beat
        AudioProcessor processor = FindObjectOfType <AudioProcessor>();

        processor.addAudioCallback(this);
    }
Пример #30
0
    void Start()
    {
        source = gameObject.GetComponent <AudioSource>();
        notes  = new List <Note> ();
        //Select the instance of AudioProcessor and pass a reference
        //to this object
        AudioProcessor processor = FindObjectOfType <AudioProcessor> ();

        processor.onBeat.AddListener(onOnbeatDetected);
        processor.onSpectrum.AddListener(onSpectrum);
    }
Пример #31
0
        private bool Run(Config config, Logger log)
        {
            System.Console.WriteLine($"Listening for Dispatches on Device: {config.InputDevice}");

            audioStorage          = new WatcherAudioStorage(log);
            evaluator             = new AudioEvaluator(log);
            recorder              = new AudioRecorder(evaluator, audioStorage);
            processor             = new AudioProcessor(recorder, evaluator, audioStorage);
            com                   = new ComService(log, processor);
            com.CallCreatedEvent += Com_CallCreatedEvent;

            System.Console.WriteLine("Hooking into Events");
            recorder.SampleAggregator.MaximumCalculated  += SampleAggregator_MaximumCalculated;
            recorder.SampleAggregator.WaveformCalculated += SampleAggregator_WaveformCalculated;

            processor.TriggerProcessingStarted  += Processor_TriggerProcessingStarted;
            processor.TriggerProcessingFinished += Processor_TriggerProcessingFinished;

            evaluator.WatcherTriggered += Evaluator_WatcherTriggered;

            ResgridV3ApiClient.Init(config.ApiUrl, config.Username, config.Password);

            System.Console.WriteLine(
                $"Config Loaded with {config.Watchers.Count} watchers ({config.Watchers.Count(x => x.Active)} active)");

            System.Console.WriteLine("Initializing Processor");
            processor.Init(config);

            System.Console.WriteLine("Starting Processor");
            processor.Start();

            System.Console.WriteLine("Starting Communication Service");
            com.Init(config);
            System.Console.WriteLine("Communication Service: Validating API Connection");

            if (com.IsConnectionValid())
            {
                System.Console.WriteLine("Communication Service: API Connection is Valid");
            }
            else
            {
                System.Console.WriteLine(
                    "Communication Service: CANNOT TALK TO RESGRID API, CHECK YOUR CONFIG APIURL AND ENSURE YOUR COMPUTER CAN TALK TO THAT URL");
            }

            System.Console.WriteLine("Ready, Listening to Audio. Press Ctrl+C to exit.");

            while (recorder.RecordingState == RecordingState.Monitoring || recorder.RecordingState == RecordingState.Recording)
            {
                Thread.Sleep(250);
            }

            return(true);
        }
Пример #32
0
    void Start()
    {
        //Select the instance of AudioProcessor and pass a reference
        //to this object
        AudioProcessor processor = FindObjectOfType <AudioProcessor> ();

        processor.onBeat.AddListener(onOnbeatDetected);
        processor.onSpectrum.AddListener(onSpectrum);
        anim = beater.GetComponent <Animator>();
        i    = 0;
    }
Пример #33
0
    private void Awake()
    {
        life = MaxLife;

        // Setting up references.
        groundCheck = transform.Find("GroundCheck");
        ceilingCheck = transform.Find("CeilingCheck");
        anim = GetComponent<Animator>();
        rb = GetComponent<Rigidbody2D>();

        kamehamehas = new Pool<Bullet>(kamehameha, 8, 16);
        kamehamehas.automaticReuseUnavailables = true;

        tornados = new Pool<Bullet>(special_tornado, 4, 8);
        tornados.automaticReuseUnavailables = true;

        cam = Camera.main.GetComponent<CharacterCamera>();
        audio_process = AudioProcessor.Instance;
        Enemy_manager = EnemyManager.Instance;
        Bonus_manager = BonusManager.Instance;
    }
Пример #34
0
 void Start()
 {
     audioProc = FindObjectOfType<AudioProcessor>();
     audioProc.addAudioCallback (this);
 }
    // ============================================================
    float HauteurCube( AudioProcessor audioProcessor, int range )
    {
        // range :
        // Basses -> 0
        // Mids   -> 1
        // Aigues -> 2

        int cuton = 0;
        int cutoff = 0;
        float scale = 0f;
        float[] amplitudes;
        //float cumul = 0f;
        float moy;
        float hauteur;

        // Selection des parametres
        switch ( range )
        {
        case 0 :
            cuton = 0;
            cutoff = 8;
            scale = 100f;
            break;
        case 1 :
            cuton = 16;
            cutoff = 128;
            scale = 720f;
            break;
        case 2 :
            cuton = 512;
            cutoff = 1024;
            scale = 16000f;
            break;
        default :
            amplitudes = new float[1];
            Debug.LogError("range doit etre entre 0 et 2");
            break;
        }

        // moyenne du range de la FFT
        amplitudes = new float[cutoff-cuton];
        Array.Copy(audioProcessor.amplitudes, cuton, amplitudes, 0, cutoff-cuton);
        moy = scale * amplitudes.Average ();

        // application de la transformation mathematique
        cumul = 0.90f * cumul + 0.3f * Tanh (moy);
        hauteur = (0.4f * cumul +  0.3f*(moy) );
        if (hauteur < 0.1f)
            hauteur = 0.1f;

        return hauteur;
    }
Пример #36
0
 /// <summary>
 /// Return a pointer to the unmanaged version of this callback.
 /// </summary>
 /// <param name="callback">The callback.</param>
 /// <returns>A pointer to a shadow c++ callback</returns>
 public static IntPtr ToIntPtr(AudioProcessor callback)
 {
     return ToCallbackPtr<AudioProcessor>(callback);
 }
Пример #37
0
    void Awake()
    {
        processor = FindObjectOfType<AudioProcessor>();
        processor.addAudioCallback(this);

        enemiesSpawner = EnemyManager.Instance;
        platformSpawn = TerrainManager.Instance;

        player = LoadCharacter.Instance.GetCharacter().transform;

        _lastShoot = Time.time;
    }
Пример #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EffectDescriptor"/> class with a Stereo Effect.
 /// </summary>
 /// <param name="effect">The effect.</param>
 public EffectDescriptor(AudioProcessor effect) : this(effect,2)
 {
 }