<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: accessing FTM data from your external?</title>
		<atom:link href="http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 00:19:44 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-33730</guid>
					<title><![CDATA[accessing FTM data from your external?]]></title>
					<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-33730</link>
					<pubDate>Tue, 18 Sep 2007 22:53:24 +0000</pubDate>
					<dc:creator>tirilo</dc:creator>

					<description>
						<![CDATA[
						<p>
Hi,</p>
<p>I am trying to access ftm data to use in my externals. For instance I would like to have access to the data inside an fmat. How can I do that? <br />
I have included the ftmlib framework in my external and bounded  the &#8220;ftm.obj&#8221; to a function that does nothing for now.</p>
<p>Thanks</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112744</guid>
					<title><![CDATA[Re: accessing FTM data from your external?]]></title>
					<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112744</link>
					<pubDate>Wed, 19 Sep 2007 09:54:24 +0000</pubDate>
					<dc:creator>Olaf Matthes</dc:creator>

					<description>
						<![CDATA[
						<p>
Am 19.09.2007 um 00:53 schrieb tirilo:</p>
<p>><br />
><br />
> Hi,<br />
><br />
> I am trying to access ftm data to use in my externals. For instance  <br />
> I would like to have access to the data inside an fmat. How can I  <br />
> do that?<br />
> I have included the ftmlib framework in my external and bounded   <br />
> the &#8220;ftm.obj&#8221; to a function that does nothing for now.</p>
<p>If you want to access FTM data you have to write your external using  <br />
the FTM API. You should download the FTM source code (from  <br />
sourceforge) and see how it is done. Also, joining the FTM developers  <br />
mailing list (also on sourceforge) and asking your questions there  <br />
might help since there is really no documentation apart from the  <br />
source code itself.</p>
<p>Olaf</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112745</guid>
					<title><![CDATA[Re: accessing FTM data from your external?]]></title>
					<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112745</link>
					<pubDate>Thu, 20 Sep 2007 15:18:13 +0000</pubDate>
					<dc:creator>tirilo</dc:creator>

					<description>
						<![CDATA[
						<p>Hello, and thank you for your answer.<br />
So using the ftm api is what i was trying to do. I actually linked my external against the ftmlib library and I am at the point where I pass a reference to an fmat into my external&#8217;s inlet and get the &#8220;ftm.obj&#8221; message. To test if I could get any info about the fmat I was trying to do something like:</p>
<p>class_addmethod(c, (method)myext_testftm, &#8220;ftm.obj&#8221;, A_GIMME, 0L); </p>
<p>and</p>
<p>
void myext_testftm(t_myext *x, t_symbol *s, short argc, t_atom *argv)<br />
{<br />
   short i; <br />
   int j =0;<br />
   char str[256];<br />
   fmat_t* fmat = 0;</p>
<p>   int n = 0;<br />
   int m = 0;</p>
<p>
   fmat = &#038;argv[i].a_w;</p>
<p>   /*to test if I can get m and n which I assume are the fmat sizes*/<br />
   m = fmat_get_m(fmat);<br />
   n = fmat_get_n(fmat);</p>
<p>   cpost(&#8220;m = %d n = %dn&#8221; , m , n);<br />
}</p>
<p>This was to see if just casting to an fmat would work.<br />
No luck.<br />
I have browsed in the ftm source code briefly but it will probably take me ages to actually get the jist of it. In particular I have tried to mimick  what I understand from the ftm.print.c file to see how they do it but still no luck.  So I have come up with a &#8220;dirty&#8221; alternative right now where I just use ftm.iter in my patch and feed the results to my external via an additional inlet. It is not ideal but works so far.</p>
<p>Thanks for pointing me to the ftm list though. I will definetly join when I have more time to spend on actually understanding ftm code.</p>
<p>Cheers.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112746</guid>
					<title><![CDATA[Re: accessing FTM data from your external?]]></title>
					<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112746</link>
					<pubDate>Thu, 20 Sep 2007 21:11:48 +0000</pubDate>
					<dc:creator>Olaf Matthes</dc:creator>

					<description>
						<![CDATA[
						<p>
Am 20.09.2007 um 17:18 schrieb tirilo:</p>
<p>><br />
> Hello, and thanks you for your answer.<br />
> So using the ftm api is what i was trying to do. I actually linked  <br />
> my external against the ftmlib library and I am at the point where  <br />
> I pass a reference to an fmat into my external&#8217;s inlet to get the  <br />
> &#8220;ftm.obj&#8221; message. To test if I could get any info about the fmat I  <br />
> was trying to do something like:<br />
><br />
> class_addmethod(c, (method)myext_testftm, &#8220;ftm.obj&#8221;, A_GIMME, 0L);</p>
<p>This is the recommended way:</p>
<p>class_addmethod(c, (method)myext_testftm, ftm_str_obj, A_GIMME, 0);</p>
<p>Actually the FTM developers recommend to use the strange and un  <br />
documented FTM MACROS instead of the native Max API code because that  <br />
will make your externals compilable under PD in the future, in case  <br />
you care about that. Additionally, some more advanced stuff (like  <br />
reading from a track containing fmats) can only be done using these  <br />
macros.</p>
<p>
>    fmat = &#038;argv[i].a_w;</p>
<p>Should be:</p>
<p>	fmat =  (fmat_t *)fts_get_object(argv);</p>
<p>> I have browsed in the ftm source code briefly</p>
<p>Chack ftm.midiunparse.c, that will help you a lot I guess.</p>
<p>
Olaf</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112747</guid>
					<title><![CDATA[Re: accessing FTM data from your external?]]></title>
					<link>http://cycling74.com/forums/topic/accessing-ftm-data-from-your-external/#post-112747</link>
					<pubDate>Thu, 20 Sep 2007 22:53:18 +0000</pubDate>
					<dc:creator>tirilo</dc:creator>

					<description>
						<![CDATA[
						<p>It works thanks!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

