electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Paulo Santos Synth-ing NºX

poster

Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
ma
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
sandydo



Joined: Mar 15, 2017
Posts: 1
Location: Berlin

PostPosted: Wed Mar 15, 2017 8:40 am    Post subject: ma Reply with quote  Mark this post and the followings unread

Hello Chuck programmer,

I have a special wish in working with audio files in Chuck and since I'm new to the language I'm not sure how to succeed.

In particular, I want to interpolate two audio files in the way, that when I have two files, e.g. "violin.wav" and "trumpet.wav" both of the same length let's say. Then I want to create or play a third audio file which is a mixture of both, so that the sample starts as "violin.wav" and end as "trumpet.wav" and in between it should be continuously interpolated...

My idea for this is if we had the two buffer as arrays like:
"violin.wav" -> violinArray =[34,3,43,56,23,67,23,67,54,78,23,54]
"trumpet.wav" -> trumpetArray [32,4,65,65,65,34,65,23,6,76,5,4]

Then I want to create something like.
Code:

int N = violinArray.length;
new array mixtureArray[N];
for (i = 0; i< N; i++)
  {
     mixtureArray[i] = i*violinArray[i] + (N -(i+1))*trumpetArray[i];
  }


But the difficulty for me is to get the data of "violin.wav" and "trumpet.wav" as an array or something similar... Is it even possible to view the real data of a sound buffer??

I fancy every commentary or contribution.

Cheers,
Thomas
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use