Snippet: Stereo Audio Recorder
-
- This snippet implements a stereo audio recorder
- The final audio data is written to a file and loaded into an Audio Loop Player
HiseSnippet 2923.3oc2Zs0TajbEdDvXao8RVuwOjG6hJUEgWhPxvhsKp0V.FrIgKpPrdWWtHTsloGoILS2S5oEfrKW09PRU4s7SHukeG6ujTIOmW1WxyImS2yMcwXff2DGvf0b5aem6mSOzRJbXwwBoUoJGLHhYU5isaOfq5sdOpO2ZqmXU5Ss2gFqXRhgzZChnwwLWqRkl9oHgRkmwR+0O730nATtCKmjk0yE9Nrs8C8U4Ta07W6GDrI0kcfeXgYuTysbD70EAh9.dl1ttUD04XZW1tTbZSYa8LZbOqR20t9WtLic+E8bcoKtn6xKu7CevCW5gMnd0Wh1owxObo6sz8u2CtumUoargquRHaqnJVrUoYVS3NncOwobyA7b+X+NAL7gFVsgS1PdSQfKxhHUq064G31JUPEaYUxtUtXaZiX6N16365mQOW78Y5AH4qnn.rzTCCuoGBdMJBu5Ef2DfToBPx1.oaa21Q5GoxGAwyGYuEGzldTPOUDJ61Ob09t9hM8CPjXWpDnQLaf0Tunh85BXYbUsP5wrMkvCYaS0kqWedB7q4VoRkEtakxGzyOlDy8ihXJheXT.KDVYLgRP6HlfPwChHYNBoKShKfQ774zfjQ7.LPf83TouBNThBVhgHk6RBDfkiKwmij4DMpIaKDQjVAzAv9c2EpTALjhUjSnRhgG17aaP9Jh1ztVWlRun1TDaYhmpyZlJAl6r.ujuETu1ABEt9z8JaOPwUUMmmO880LFL8TYFL40EgQBN7P0YMCimPkJcCDc.1t6Qxz03QChYqPVXAhBjJQFvsVfv4XsDg5q74cIdBILNPvKf1MeWnNN8C6GPASJXqd4g584TvYizgAx6Xl7DPxgKlRVrdLygDv3cU8.gIbTrHpjcf.khnHGHbB.XBM.Ncp9XUBAIruid9H7LpKUOIi5RpRUv1AwJzGfd6qUq1b.WVwmG3yAcbetixWvIBtQHfBHoHnpSpzYdP.FzmMWkWWobAghl3JUJWoruGoZxTJCyorQiRcc2UnX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Q1Ht1GCkbUjYnc9ZBww3U4EeMjO5VlAuo8tB+XlNhxma9L4oLNd8VBYiqi2bSzE9M2TZ5y6Euz3J9hWl480KdYlKVI5mO79.noqgdOQkSwXa8KoYC9Ir.vtKw9IwLNk5v1O6H3hzzl4lL6yfL9c6xF1eYRLzpJEDFLmxcZtOCe2A41T+7+RysgrjToNV4USVz3hKKNO80Oy1.WBZzS9OQu8ipY10PiyW638p2D8kN.x6TkeqrW3s17+o4uvaCABR47BahYrgD5EI7MCc0LVun4XAVew2uE3QIUPgmT4nh+outLsm4BaifrzGN1zXXI70S9ADf0lDe3.3OytE88lAwUzS81F7Zau8l6k.R3SjLz23bA4e6U24u9307iPGNLxWdIklwI+g+w+7wXMMak6a27O07anmvvK0OovqL1caVW3LKR4.VXjn8.9P4BaGBUu1CZCd3JktSS7uTgM3TPh3VbSZ0Cx9smmWLSMz1.a6AByeANqis3Wbvs5xgdwLWneQ5q2OVIBSY.cWVX8sllido8xKUC9x6Kve+v0ges3dWOOac8kadpKn45OUaIjoxQah+G2Ayf3Liv+ah3eLtnl+e4LBoNRwQNl6PCsPuklBHa45q7nr8N3yjFi+5hBg9PNxwY3sZrEduq5BW7ptvktpK7KupKb4q5Bu+UcgO3cuPrMwUSdo8P9NKqcZsgITYor3zkl15eC.NEtlC
-
@ustk Fantastic work! I have been waiting ages for some type of audio buffer in HISE, it offers a lot in terms of FX processing! :)
-
@ustk I am looking at the code and I am asking myself if it possible to adopt this for a ring buffer (a circular buffer that consistently rewrites). Do you think this achievable?
I can see retriggering the record process based on some input (MIDI, audio signal), but then I would end up with a unmanageable amount of audio files.
-
@HISEnberg That is doable (although if you want it to be sample accurate, doing this with script (so not on the C++ side) would be CPU enemy
Also, the problem is that keeping the same audio file name doesn't update the audio loop player, or at least I failed doing so. Even re-writing the file and loadAudioPool keeps the old version in memory
-
@ustk Yes I see what you mean, this is a really cool example nonetheless so thanks for sharing!
-
@ustk Nice work, thank you!
-
@ustk Great snippet, Thank you.