程序员音乐_预订音乐会的程序员指南

程序员音乐

by Sina Habibian

通过新浪Habibian

预订音乐会的程序员指南 (The Programmer’s Guide to Booking a Concert)

About two months ago, a friend and I decided to organize a concert in San Francisco. We had no prior experience promoting shows, but we both loved live music and felt up to the challenge. Plus, 2016 had been a crappy year, and it seemed like this would be a good way to bring the community together and end the year on a positive note.

大约两个月前,我和一个朋友决定在旧金山举办一场音乐会。 我们以前没有进行演出推广的经验,但是我们都热爱现场音乐,并且能够应对挑战。 另外,2016年是糟糕的一年,这似乎是将社区团结在一起并以积极的姿态结束这一年的好方法。

We began by reaching out to local acts we personally knew with hopes of booking them for a concert in December. A week later, we had exhausted our list of contacts and still had no success. I began thinking about whether we could analyze social media to scout local musicians.

我们首先接触了我们个人熟悉的地方演出,希望能在12月为他们预定一场音乐会。 一周后,我们已经用尽了所有联系人列表,但仍然没有成功。 我开始考虑我们是否可以分析社交媒体来侦察本地音乐家。

I decided to look into Soundcloud, the de facto online hangout for musicians. Having met a few musicians through another project, I knew they routinely used the platform to distribute music and connect with fans. It didn’t matter who or where someone was — a bedroom DJ in SoMa, a garage band in Mountain View, or a singer-songwriter in Oakland — they all posted music on Soundcloud. And as long as they had posted a single track, I knew I would be able to find them.

我决定研究Soundcloud,这是事实上的针对音乐家的在线视频群聊。 在另一个项目中结识了一些音乐家之后,我知道他们经常使用该平台来分发音乐并与粉丝建立联系。 不管是谁或在哪里,无论是SoMa中的卧室DJ,Mountain View中的车库乐队,还是奥克兰的歌手创作者,他们都在Soundcloud上发布了音乐。 只要他们发布了单曲,我就知道我可以找到他们。

爬行Soundcloud图 (Crawling the Soundcloud Graph)

A quick look at Soundcloud’s Search API revealed that it wouldn’t be adequate. The simple keyword search would not allow me to write a query like “return any user based in San Francisco or Oakland who has less than 10k followers and has posted at least one track”.

快速浏览一下Soundcloud的Search API,发现它不够用。 简单的关键字搜索不允许我编写类似“返回位于旧金山或奥克兰的跟踪者少于1万且已发布至少一条曲目的用户”之类的查询。

Looking for a solution, I realized that crawling the social graph could be an effective approach. I could write an algorithm which, when seeded with a Soundcloud user, would pull all their followers and followings, and then in turn pull all followers and followings for each of those users. This simple recursive algorithm would expand to cover thousands of users after a few iterations. I would then have the luxury to analyze the social connections any which way, the easiest of which would be writing a SQL query.

在寻找解决方案时,我意识到抓取社交图可能是一种有效的方法。 我可以编写一种算法,当该算法植入Soundcloud用户后,将提取其所有关注者和关注者,然后依次为每个用户提取所有关注者和关注者。 经过几次迭代,此简单的递归算法将扩展为覆盖数千个用户。 然后,我将可以通过任何方式来分析社交关系,最简单的方式就是编写SQL查询。

I picked Afrolicious, Mark Slee, EARMILK and a few others as seed accounts. These users are deeply integrated into the hip hop, electronic, and indie scenes of San Francisco. I was confident that their combined social graph would provide a diverse and complete representation of Bay Area music.

我选择了Afrolicious,Mark Slee,EARMILK和其他一些作为种子帐户。 这些用户已深入集成到旧金山的嘻哈,电子和独立场景中。 我有信心,他们的综合社交图谱将为湾区音乐提供多样化和完整的表现。

As I began experimenting with the algorithm, I realized that it was impractical to pull a user’s followers. Musicians regularly have tens or hundreds of thousands of followers (Calvin Harris at the extreme end of the spectrum has 7.08m followers). Pulling all followers for all users was obviously a sub-optimal approach. I also didn’t intend on paying a thousand dollars a month in database costs.

当我开始尝试该算法时,我意识到吸引用户的追随者是不切实际的。 音乐家通常有成千上万的追随者(最极端的卡尔文·哈里斯有708万追随者)。 为所有用户吸引所有关注者显然不是最佳选择。 我也不打算每月支付一千美元的数据库费用。

The solution was to crawl only the followings and not the followers. Musicians follow other musicians. Interestingly enough, there are even papers that have analyzed this behavior and the “virtual scenes” that emerge (Allington et al., 2015). By crawling the following graph, I could efficiently map out the local music scene. Furthermore, by keeping track of who follows who, I could later use an algorithm like PageRank to find up-and-comers who do not yet have many followers but nevertheless have a vote of confidence from the community.

解决方案是仅爬网以下内容,而不是追随者 音乐家跟随其他音乐家。 有趣的是,甚至有论文都分析了这种行为以及出现的“虚拟场景”( Allington等,2015 )。 通过抓取下图,我可以有效地映射出本地音乐场景。 此外,通过跟踪谁跟随谁,我以后可以使用诸如PageRank之类的算法来查找尚不具备很多追随者但仍然获得社区信任的投票者。

I built a Sinatra app to crawl the Soundcloud social graph and saved all users and their relationships to a Postgres database. After a few iterations, there were over 200k users and 500k relationships. It was time to make sense of the data.

我构建了一个Sinatra应用程序来爬取Soundcloud社交图,并将所有用户及其关系保存到Postgres数据库中。 经过几次迭代,有超过20万个用户和50万个关系。 现在是时候理清数据了。

分析网络 (Analyzing the Network)

I wrote a Python script to query the database for any Soundcloud user with at least 500 followers, at least one track, and based in San Francisco or Oakland. I then mapped out these users and their relationships onto a Networkx directed graph. It was then simple to export a .gexf graph file which could be consumed by Gephi for visual analysis.

我编写了一个Python脚本来查询数据库,以查找在San Francisco或Oakland具有至少500个关注者,至少一个轨道的任何Soundcloud用户。 然后,我将这些用户及其关系映射到Networkx定向图上。 它是那么简单的出口可能通过消耗一个.gexf图形文件Gephi的可视化分析。

Gephi turned out to be an incredible tool for visualizing social networks and gave me more than enough to play with.

事实证明,Gephi是用于可视化社交网络的不可思议的工具,并且给了我足够的乐趣。

The above is a force-directed graph of the Soundcloud network. I first used PageRank to leverage the existing follower-following relationships and determine which the most important nodes are. This is represented as the size of a node. I then layered on a built-in modularity optimization algorithm to detect communities. The community is represented as the color of a node.

上面是Soundcloud网络的力导向图。 我首先使用PageRank来利用现有的关注者跟踪关系,并确定最重要的节点。 这表示为节点的大小。 然后,我基于内置的模块化优化算法来检测社区。 社区表示为节点的颜色。

This graph provides an interesting viewpoint into the San Francisco music scene. The largest node, Anthony Mansfield, is a veteran Bay Area House DJ who is also deeply involved with the Disco Knights Burning Man camp. Another large node is Honey Sound System, a DJ collective who calls San Francisco home. The bottom-left of the graph is a Hip Hop cluster including San Francisco artists like Telli Prego and Show Banga.

该图为旧金山音乐界提供了有趣的观点。 最大的节点是安东尼·曼斯菲尔德(Anthony Mansfield),是一位经验丰富的海湾地区之家DJ,他还深入参与了“迪斯科骑士燃烧人”营地。 另一个大型节点是Honey Sound System,这是DJ的一个组织,他把旧金山称为家。 图的左下角是一个Hip Hop集群,其中包括Telli Prego和Show Banga等旧金山艺术家。

Our goal was to find musicians for our upcoming concert. Ironically, this was now tough given the quantity of available options. We had identified over a thousand Soundcloud accounts as musicians in the Bay Area. We did not have a good way of listening to this amount of music short of copying each Soundcloud URL into the browser. Furthermore, we wanted input from our friends and community on who they liked to see live.

我们的目标是为即将举行的音乐会寻找音乐家。 具有讽刺意味的是,鉴于可用选项的数量,这现在很难。 我们已经确定了1000多个Soundcloud帐户是湾区的音乐家。 除了将每个Soundcloud URL复制到浏览器之外,我们没有一种听音乐的好方法。 此外,我们希望我们的朋友和社区提供有关他们喜欢现场直播的人的意见。

侦察人才 (Scouting Talent)

To address these issues, I added a UI layer to the Sinatra app so that we could streamline our scouting efforts. It showed a list of musicians ranked according to the results of the earlier network analysis. There was an embedded Soundcloud widget so that we could listen to an artist’s music without leaving the page. I also added a rating system so that we could assess each artist and comment on whether we wanted to see them live.

为了解决这些问题,我在Sinatra应用程序中添加了一个UI层,以便我们可以简化侦察工作。 它显示了根据早期网络分析结果排名的音乐家名单。 有一个嵌入式Soundcloud小部件,因此我们可以在不离开页面的情况下收听艺术家的音乐。 我还添加了一个评分系统,以便我们可以评估每个艺术家并评论我们是否希望看到他们的生活。

I then layered on a user authentication scheme so that multiple people could use the system at once. We enlisted the help of a few friends living in the city who also appreciate music. With their help and our newly built talent scouting system, we collectively listened to and voted on 400 artists. I then built an admin page so that I could see the best rated musicians across the platform.

然后,我建立了一个用户身份验证方案,以便多个人可以一次使用该系统。 我们争取到了一些住在城市的朋友的帮助,他们也喜欢音乐。 在他们的帮助下以及我们新建立的人才发掘系统,我们共同听取了400位艺术家的意见并对其进行了投票。 然后,我建立了一个管理页面,以便可以看到整个平台上评分最高的音乐家。

We had crowd-sourced our scouting efforts and were starting to find some gems. More importantly, we had validated demand on which local acts our friends and community wanted to see live.

我们通过众包方式进行了探索工作,并开始发现一些宝石。 更重要的是,我们已经验证了对我们的朋友和社区希望现场直播哪些地方行为的需求。

预约演出 (Booking the Show)

With things coming together, we gave ourselves a name: the Gremlins. Gremlins are cute, mischievous, and are always messing around and breaking things. This seemed fitting given our progress so far.

随着事情的发展,我们给自己起了个名字:格林姆斯。 小妖精可爱,调皮,并且总是四处乱逛并破坏事物。 鉴于我们到目前为止的进展,这似乎很合适。

We reached out to a few of our favorite new artists, and booked two funky and talented local acts: Foxtails Brigade and Baby’s Day Out. We were talking with venues in parallel and landed a night at The Lost Church, a cozy theatre in The Mission with capacity for 75 people. The wooden interior and the eclectic artwork strewn about the place were inline with the atmosphere we were trying to create.

我们接触了一些我们最喜欢的新艺术家,并预订了两个时髦又有才华的当地表演:狐尾旅和婴儿节。 我们在平行讨论场地,并在The Lost Church住了一个晚上,这是The Mission舒适的剧院,可容纳75人。 木制内部和周围散布着的折衷艺术品与我们试图营造的氛围相呼应。

格林姆斯出席 (The Gremlins Present)

A month later, we walked into The Lost Church on the night of the concert. I felt a sense of fulfillment as we welcomed friends and friends-to-be into the theatre. The show was sold out.

一个月后,我们在音乐会之夜走进了失落的教堂。 当我们欢迎朋友和将来成为剧院的朋友时,我感到很满足。 该节目被抢购一空。

Laura from Foxtails Brigade and Meggy and Mel from Baby’s Day Out shared their music with a lively audience. We followed them through joyful and melancholic moments. It was a memorable evening.

Foxtails Brigade的Laura和Baby's Day Out的Meggy and Mel与活跃的听众分享了他们的音乐。 我们跟随他们经历了快乐而忧郁的时刻。 那是一个令人难忘的夜晚。

In coordinating this concert, I experienced two weirdly different perspectives on viewing a ‘musician’. First, as a node whose relative importance and degree of connectedness can be calculated in a connected network. Second, as a soulful and talented human being who can move an audience through the expression of their art.

在协调这场音乐会时,我在观看“音乐家”时遇到了两种截然不同的观点。 首先,作为可以在连接的网络中计算其相对重要性和连接程度的节点。 其次,作为一个充满灵魂和才华的人,他们可以通过他们的艺术表达来吸引观众。

This dichotomy is a fact of life in today’s world. We are each heavily networked within the social graphs of Facebook, Instagram, and Twitter. It’s fascinating to think of ourselves as nodes in this perspective. I wonder what insights tinkerers at these companies have gleaned about our inner lives.

这种二分法是当今世界的现实。 我们每个人都在Facebook,Instagram和Twitter的社交图中紧密地联系在一起。 从这个角度来看,将自己视为节点非常有趣。 我想知道这些公司的修补匠对我们的内心生活有何见解。

Subscribe to follow my writing, or ping me on Twitter.

订阅 以跟随我的写作,或在Twitter上 ping我。

翻译自: https://www.freecodecamp.org/news/the-programmers-guide-to-booking-a-concert-e048a580735f/

程序员音乐

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值