| correction:
FUNC *ftp = csound->FTnp2Find(csound,p->ifn);
On 2 Apr 2010, at 14:05, Victor Lazzarini wrote:
> I think something like that should do:
>
> typedef struct _basf{
> OPDS h;
> MYFLT *ibas, *ifn;
> }BASF;
>
> int base_frequency_find(CSOUND *csound, BASF *p){
>
> ftp = csound->FTnp2Find(csound,*p->ifn);
> *p->ibas = ftp->cvtbas;
>
> return OK;
> }
>
>
> and in csound code
>
> ivar basf ifn
>
> Victor
>
> On 2 Apr 2010, at 13:33, Oeyvind Brandtsegg wrote:
>
>> Yes, exactly.
>> This will be very nice, looking forward to hear what you find.
>> best
>> Oeyvind
>>
>> 2010/4/2 andy fillebrown :
>>> That would be nice, but Oeyvind is talking about the user defined
>>> pitch in the chunk that Soundforge lets you set (along with
>>> the
>>> other info in the chunk like loop start and end). Since a lot of
>>> the
>>> gigasample and kontakt sample files have chunks, too, it
>>> would
>>> be really nice to have access to that info in Csound instead of
>>> having
>>> to set the parameters manually each time.
>>>
>>> When I have more time I'd like to investigate the loscil opcode to
>>> see
>>> exactly how it works. I strongly suspect it reads the chunk,
>>> which would mean all the code to make an "ftpitch" opcode is already
>>> there.
>>>
>>> Cheers,
>>> ~ andy.f
>>>
>>>
>>>
>>> On Fri, Apr 2, 2010 at 3:02 AM, Andres Cabrera >> > wrote:
>>>> Hi,
>>>>
>>>> But you'd still have to have put the chunk in there, maybe Oeyvind
>>>> wants something automatic? I guess this could be a UDO, which scans
>>>> the table, and does pitch analysis for a few tens of milliseconds
>>>> after the attack, and store that...
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>> On Fri, Apr 2, 2010 at 2:50 AM, andy fillebrown
>>>> wrote:
>>>>> A lot of times the sample will have attack and release section
>>>>> combined with a looping section. In these cases it is generally
>>>>> only
>>>>> the looping section that will be at the correct pitch. I'm not
>>>>> sure
>>>>> how this is implemented in aiff files, but in wav files all this
>>>>> info
>>>>> is stored in a chunk, which is probably what loscil is
>>>>> reading.
>>>>> Since the code is already there in loscil, it should be relatively
>>>>> simple to implement something that retrieves the separate
>>>>> sections of
>>>>> the chunk (or its equivalent for other formats). It
>>>>> would be a
>>>>> convenient way to use those kinds of samples in other opcodes,
>>>>> too,
>>>>> like diskin2 =)
>>>>>
>>>>> Cheers,
>>>>> ~ andy.f
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Apr 1, 2010 at 8:32 PM, Oeyvind Brandtsegg >>>> > wrote:
>>>>>> Yes, I can do this, but I was thinking of the original pitch as
>>>>>> in the
>>>>>> pitch of the audio in the file.
>>>>>> It is possible to save the (not necessarily correct, it's an
>>>>>> arbitrary
>>>>>> value) pitch with the file, at least for aiff files.
>>>>>> In my editor (soundforge), I can set this in a dialog:
>>>>>> Special - Edit Sample
>>>>>> ... with a value called "Midi unity note of sample (C0 to G10)"
>>>>>>
>>>>>> This way the information of what midi key should play back the
>>>>>> sample
>>>>>> untransposed can be stored in the file.
>>>>>> I only need to access this information in the instrument ... :-)
>>>>>>
>>>>>> best
>>>>>> Oeyvind
>>>>>>
>>>>>> 2010/4/1 Rory Walsh :
>>>>>>> Perhaps you can use filelen to find out the length of the sample
>>>>>>> you've loaded and then set the frequency according to the
>>>>>>> length and
>>>>>>> the sampling rate.
>>>>>>>
>>>>>>> Rory.
>>>>>>>
>>>>>>>
>>>>>>> On 1 April 2010 14:50, Oeyvind Brandtsegg
>>>>>>> wrote:
>>>>>>>> Is there a way to read an audio sample's (loaded by gen01)
>>>>>>>> original
>>>>>>>> pitch in an instrument?
>>>>>>>> ... an opcode called "ftpitch" or something similar.
>>>>>>>> I guess this information must be available, as loscil can
>>>>>>>> access it.
>>>>>>>> It would be handy when building all kinds of sample playback
>>>>>>>> methods.
>>>>>>>>
>>>>>>>> best
>>>>>>>> Oeyvind
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> Andrés
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?
>>> group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|