作为一名 Web 开发人员,我知道如何编写事件驱动的用户界面,但不了解其他代码系列(嵌入式软件,如汽车软件、装配线上的自动化软件、驱动程序或 CNN 上的爬行下三分之一等) .)
我正在查看 iTunes 可视化工具 (示例)并且我很好奇:
-
使用什么代码来编写可视化工具? Objective C?
-
它使用核心动画吗?该库提供什么类型的抽象?
-
代码是什么样的?它是用于生成疯狂图形的数学方程列表吗?它是带有补间的关键帧列表吗?是否有一系列图像、分形、虫洞、花朵、火花以及将它们混合在一起的某种魔法。或者完全不同的东西?
我不是在寻找教程,只是想了解与 Web 开发截然不同的东西是如何工作的。
哦,是的,我知道 iTunes 是闭源的,所以所有这些都是猜测。
Being a web developer, I know how event driven user interfaces are written, but do not have insight into other families of code (embedded software like automotive software, automation software on assembly lines, drivers, or the crawling lower-thirds on CNN, etc.)
I was looking at the iTunes visualizer (example) and am curious:
-
What code is used to write the visualizer? Objective C?
-
Does it use Core Animation? What type of abstraction does that library offer?
-
What does the code look like? Is it a list of mathematical equations for producing the crazy graphics? Is it a list of key frames with tweening? Is there an array of images, fractals, worm holes, flowers, sparkles, and some magic mixing them together. Or something totally different?
I am not looking for a tutorial, just an understanding of how something very different than web development works.
Oh yah, I know iTunes is closed source, so all of this is conjecture.
发布评论
评论(5)
对于特定的 iTunes Visualizer,我认为它是由 Flight404 创建的......在 cinder 中。谷歌他的网站。我认为几年前他和安德鲁·贝尔一起做到了
For Specific iTunes Visualizer, I think it is created by Flight404...in cinder. google his site. I think he did it with Andrew Bell few years ago
虽然默认的 iTunes 可视化工具是用 Objective-C/C++ 编写的,但您也可以使用 Quartz Composer< 编写 iTunes 可视化工具< /a>,它包含在 Mac 上的 XCode 中。它是一个基于节点的视觉效果合成环境。它有一个用于创建音乐可视化工具的模板。
Although the default iTunes visualizer is written in Objective-C/C++, you can also write iTunes visualizers using Quartz Composer, which is included with XCode on the Mac. It is a node-based compositing environment for visual effects. It has a template for creating Music Visualizers.
在我看来:
可能是 C 和/或 Objective-C 以及 OpenGL。
有可能。核心动画提供可以非常轻松有效地进行动画处理的图层(图像)(淡入、淡出、平移、旋转等)。它可能使用与 OpenGL 相同的硬件加速。这些层可用于可视化工具中的过渡。
你的赌注和我的一样好,但你可能是对的。他们可能会使用一组数学方程,将许多变量(例如声音的幅度)作为输入并生成图像。
In my opinion:
Probably C and/or Objective-C with OpenGL.
Possibly. Core Animation provides layers (images) that can be animated very easily and efficiently (fade-in, fade-out, translation, rotations, etc.). It probably uses the same hardware acceleration as OpenGL does. These layers may be used for transitions in the visualizer.
Your bet is as good as mine, but you're probably right. They may use some set of mathematical equations that takes as input a number of variables (such as the amplitude of the sound) and produce an image.
iTunes 似乎使用 G-Force 可视化工具(或者至少,G-Force 已获得在 iTunes 8.x 中使用的许可):
http://en.wikipedia.org/wiki/Music_visualization
http://en.wikipedia.org/wiki/SoundSpectrum" rel="nofollow noreferrer">http:/ /en.wikipedia.org/wiki/SoundSpectrum
从更一般的意义上来说,可视化通常是各种几何元素的组合,其参数与某些声音测量(音量、音调等)、波形和频谱图相关联,在这些源元素之上分层放置各种视觉转换/过滤器。这就是为什么您往往会在可视化中看到很多波浪线 - 它们是表示波形和频谱的常见形式。
iTunes appears to use the G-Force visualizer (or at least, G-Force was licensed for use in iTunes 8.x):
http://en.wikipedia.org/wiki/Music_visualization
http://en.wikipedia.org/wiki/SoundSpectrum
In a more general sense, visualizations are typically combinations of various geometric elements whose parameters are linked to certain sound measurements (volumne, pitch, et cetera), waveforms, and spectrum graphs, with various visual transformations/filters layered on top of those source elements. That's why you tend to see a lot of squiggly lines in visualizations - they're a common form of representing waveforms and spectrums.
有点相关——如果你想学习如何做“ol'skool”可视化,比如 iTunes,或者,对于那些还记得的人来说,WinAmp,并用 JavaScript 来做(然后你可以通过 React Native 或 Native Script 之类的东西来实现它)为 iOS 或 Android 编译),请参阅 Ruth Johh 在华盛顿州西雅图举行的 CascadiaJS 2018 会议上发表的精彩演讲 —
https://www.youtube.com/watch?v=Dt4I-96C-pg
Somewhat related — if you want to learn how to do "ol' skool" visualizations like iTunes or, for those who remember, WinAmp, and do it in JavaScript (which you then could put through stuff like React Native or Native Script to have it compile for iOS or Android), see this very good talk done by Ruth Johh at the CascadiaJS 2018 conference in Seattle, WA —
https://www.youtube.com/watch?v=Dt4I-96C-pg